Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAS custom build requires prebuild, also android emulator doesn't work. #678

Open
aka241193 opened this issue Oct 30, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@aka241193
Copy link

aka241193 commented Oct 30, 2024

Description
EAS build requires expo prebuild to be run and contain android and ios folder explicitly. Which I guess shouldn't be the case since the build is being used from eas as seen the log.

launch.json

    {
      "type": "radon-ide",
      "request": "launch",
      "name": "Radon IDE panel",
      "isExpo": true,
      "eas": {
        "ios": {
          "profile": "development-simulator"
        },
        "android": {
          "profile": "development-simulator", 
        }
      },
    },

Further on executing the command expo prebuild and build being used from eas following are the failures for:
android

Error: Command failed with exit code 1: /Users/someUser/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.app.some
Failure [DELETE_FAILED_INTERNAL_ERROR]
adb: filename doesn't end .apk or .apex

ios works fine.

I have followed all the troubleshooting steps mentioned here: https://ide.swmansion.com/docs/troubleshooting

Environment

  • Version of currently used Radon IDE (Extensions tab -> click on Radon IDE extension -> version is located next to the extension name) v0.0.21
  • Version of React Native/Expo used in the project.
    "expo": "~51.0.28",
    "react-native": "0.74.5",
  • Any other versions of tools related to the problem.
@aka241193 aka241193 added the bug Something isn't working label Oct 30, 2024
@filip131311 filip131311 self-assigned this Nov 4, 2024
@pietgk
Copy link
Collaborator

pietgk commented Nov 12, 2024

please note that eas.json probably does not have an android simulater build, so make sure eas.json builds match your profile name in your launch configuration

@pietgk
Copy link
Collaborator

pietgk commented Nov 12, 2024

i could partly solve the android issue by manually installing the build, after renaming it to have the .apk extension
(the adb command is copied from the logs).

╰─➤  adb -s emulator-5554 install -d -r /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-1PLeB0/7834fb61-afb8-4269-9cf0-57b52ae65f77
Performing Streamed Install
adb: filename doesn't end .apk or .apex: /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-1PLeB0/7834fb61-afb8-4269-9cf0-57b52ae65f77
╭─grop@MB-Piet ~/dev/app/development ‹3.3.0› ‹development*› 
╰─➤  cd  /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-1PLeB0                                     
╰─➤  mv 7834fb61-afb8-4269-9cf0-57b52ae65f77 7834fb61-afb8-4269-9cf0-57b52ae65f77.apk
╰─➤  cd -                                                                        
╰─➤  adb -s emulator-5554 install -d -r /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-1PLeB0/7834fb61-afb8-4269-9cf0-57b52ae65f77.apk
Performing Streamed Install
Success

but its still having some issues loading my app (stays in 'Attaching debugger' phase)

2024-11-12 09:47:39.035 [info] Emulator output INFO    | injectedQemuChannel!
2024-11-12 09:47:39.035 [info] Emulator output INFO    | Informing listeners of injection.
2024-11-12 09:47:39.035 [info] Emulator output INFO    | Rootcanal has  been activated.
2024-11-12 09:47:39.048 [info] Emulator output WARNING | *** Basic token auth will be deprecated soon, please migrate to using -grpc-use-jwt ***
2024-11-12 09:47:39.048 [info] Emulator output INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: +token
2024-11-12 09:47:39.048 [info] Emulator output INFO    | Advertising in: /Users/grop/Library/Caches/TemporaryItems/avd/running/pid_50538.ini
2024-11-12 09:47:39.049 [info] Parsing ini file /Users/grop/Library/Caches/TemporaryItems/avd/running/pid_50538.ini
2024-11-12 09:47:39.055 [info] Emulator output INFO    | setDisplayConfigs w 1080 h 2400 dpiX 420 dpiY 420
2024-11-12 09:47:49.681 [info] Calculating fingerprint
2024-11-12 09:47:50.629 [info] Calculating fingerprint
2024-11-12 09:47:53.599 [info] Emulator output INFO    | boot completed
2024-11-12 09:47:53.600 [info] Emulator output INFO    | boot time 15575 ms
2024-11-12 09:47:53.600 [info] Emulator output INFO    | Increasing screen off timeout, logcat buffer size to 2M.
2024-11-12 09:47:53.600 [info] Emulator output INFO    | Revoking microphone permissions for Google App.
2024-11-12 09:48:02.351 [info] Couldn't use cached build. App artifact not found.
2024-11-12 09:48:05.113 [info] Using EAS build artifact with ID 7834fb61-afb8-4269-9cf0-57b52ae65f77.
2024-11-12 09:48:18.798 [info] Using built app from EAS: '/var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-G2MtpC/7834fb61-afb8-4269-9cf0-57b52ae65f77'
2024-11-12 09:48:19.557 [info] Build completed in 28.93 sec.
2024-11-12 09:48:23.804 [error] Error: Command failed with exit code 1: /Users/grop/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall se.mindler.video.dev
Failure [DELETE_FAILED_INTERNAL_ERROR]
    at EV (/Users/grop/.vscode/extensions/swmansion.react-native-ide-0.0.22-darwin-arm64/dist/extension.js:14:59)
    at /Users/grop/.vscode/extensions/swmansion.react-native-ide-0.0.22-darwin-arm64/dist/extension.js:14:10506
    at processTicksAndRejections (node:internal/process/task_queues:95:5) Error while uninstalling will be ignored
2024-11-12 09:48:23.820 [error] Error: Command failed with exit code 1: /Users/grop/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -d -r /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-G2MtpC/7834fb61-afb8-4269-9cf0-57b52ae65f77
adb: filename doesn't end .apk or .apex: /var/folders/02/lddpjzr501b5y5t3x_70dwr40000gn/T/rn-ide-eas-build-G2MtpC/7834fb61-afb8-4269-9cf0-57b52ae65f77
Performing Streamed Install
    at EV (/Users/grop/.vscode/extensions/swmansion.react-native-ide-0.0.22-darwin-arm64/dist/extension.js:14:59)
    at /Users/grop/.vscode/extensions/swmansion.react-native-ide-0.0.22-darwin-arm64/dist/extension.js:14:10506
    at processTicksAndRejections (node:internal/process/task_queues:95:5) Couldn't start device session
2024-11-12 09:49:18.490 [info] Will wait for app ready and for preview
2024-11-12 09:49:18.490 [info] Launch preview /Users/grop/.vscode/extensions/swmansion.react-native-ide-0.0.22-darwin-arm64/dist/simulator-server-macos android,--id,emulator-5554
2024-11-12 09:49:18.519 [info] Stream ready http://127.0.0.1:57298/stream.mjpeg
2024-11-12 09:49:18.519 [info] sim-server: stream_ready http://127.0.0.1:57298/stream.mjpeg
2024-11-12 09:49:18.519 [info] sim-server: [2024-11-12T08:49:18Z INFO  simulator_server::mjpeg_server] MJPEG server started at http://127.0.0.1:57298/stream.mjpeg
2024-11-12 09:49:19.960 [info] Metro {"buildID":"2","bundleDetails":{"bundleType":"bundle","customResolverOptions":{},"customTransformOptions":{"engine":"hermes","bytecode":"true","routerRoot":"src/app"},"dev":true,"entryFile":"/Users/grop/dev/app/development/index.js","minify":false,"platform":"android"},"isPrefetch":false,"type":"bundle_build_started"}
2024-11-12 09:49:20.566 [info] Calculating fingerprint
2024-11-12 09:49:34.781 [info] Metro {"buildID":"2","type":"bundle_build_done"}
2024-11-12 09:49:36.083 [info] Devtools client connected
2024-11-12 09:49:48.489 [info] App is taking very long to boot up, it might be stuck. Device preview URL: http://127.0.0.1:57298/stream.mjpeg
2024-11-12 09:50:15.845 [info] Metro {"type":"client_log","level":"log","data":["__RNIDE_INTERNAL","radon-ide runtime loaded"],"mode":"BRIDGE"}
2024-11-12 09:50:15.845 [info] Metro {"type":"client_log","level":"log","data":["Running \"main\" with {\"rootTag\":11}","http://localhost:56702/index.bundle//&platform=android&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp","46462","22"],"mode":"BRIDGE"}
2024-11-12 09:50:15.882 [info] Metro {"type":"client_log","level":"warn","data":["A market need to be selected for getMarketStrategy","http://localhost:56702/index.bundle//&platform=android&dev=true&hot=false&transform.engine=hermes&transform.bytecode=true&transform.routerRoot=src%2Fapp","598451","18"],"mode":"BRIDGE"}
2024-11-12 09:50:16.051 [error] [Error: get user data error: Error: Cannot perform getUser claims without JWT]
2024-11-12 09:50:16.152 [info] App ready
2024-11-12 09:50:16.155 [info] App and preview ready, moving on...
2024-11-12 09:50:17.199 [info] Connected to debugger, moving on...
2024-11-12 09:50:17.200 [info] App launched in 58.94 sec.
2024-11-12 09:50:17.236 [warning] CDP message error received {"code":-32601,"message":"FuseboxClient.setClientMetadata wasn't found"}
2024-11-12 09:50:17.351 [warning] CDP message error received {"code":-32601,"message":"Debugger.setAsyncCallStackDepth wasn't found"}
2024-11-12 09:50:17.360 [warning] CDP message error received {"code":-32601,"message":"Debugger.setBlackboxPatterns wasn't found"}
2024-11-12 09:50:17.368 [info] Metro {"buildID":"c","bundleDetails":{"bundleType":"map","customResolverOptions":{},"customTransformOptions":{"engine":"hermes","bytecode":"true","routerRoot":"src/app"},"dev":true,"entryFile":"/Users/grop/dev/app/development/index.js","minify":false,"platform":"android"},"isPrefetch":false,"type":"bundle_build_started"}
2024-11-12 09:50:19.012 [info] Metro {"buildID":"c","type":"bundle_build_done"}
2024-11-12 09:50:19.042 [error] [Error: get user data error: Error: Cannot perform getUser claims without JWT]
2024-11-12 09:53:08.425 [info] Calculating fingerprint
2024-11-12 09:53:20.281 [info] Calculating fingerprint

filip131311 added a commit that referenced this issue Nov 22, 2024
This PR adds additional user facing information about eas builds, to let
users know when production build is used instead of development one.
More over eas build crashes are getting a new build error alert
description to redirect users to Radon IDE log instead of non existing
build logs.

Finally this PR adds .apk file extension to android packages to avoid
errors with tools we use to install and uninstall application on device.

Fixes android portion of  #678

### How Has This Been Tested: 

Run an application using eas on android using production and development
profiles.

---------

Co-authored-by: Krzysztof Magiera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants