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

Build failed with an exception while testing expo_eject branch #10

Closed
jmiranda opened this issue Jul 23, 2021 · 17 comments
Closed

Build failed with an exception while testing expo_eject branch #10

jmiranda opened this issue Jul 23, 2021 · 17 comments
Assignees

Comments

@jmiranda
Copy link
Member

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ adb devices
List of devices attached
19064521402185	device

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
warn Package expo-updates has been ignored because it contains invalid configuration. Reason: Cannot find module 'expo-updates/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-screens has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-screens/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-unimodules has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-unimodules/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-native-web has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-web/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package babel-jest has been ignored because it contains invalid configuration. Reason: Cannot find module 'babel-jest/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package jest has been ignored because it contains invalid configuration. Reason: Cannot find module 'jest/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
warn Package react-test-renderer has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-test-renderer/package.json'
Require stack:
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/resolveNodeModuleDir.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/releaseChecker/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/runServer.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/start/start.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /home/jmiranda/git/openboxes-mobile/node_modules/react-native/cli.js
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1314 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/jmiranda/git/openboxes-mobile/android/settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'openboxes-expo'.
> Could not read script '/home/jmiranda/git/openboxes-mobile/node_modules/react-native-unimodules/gradle.groovy' as it does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 557ms

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@jmiranda
Copy link
Member Author

Nevermind this was just an npm install issue.

@jmiranda
Copy link
Member Author

The next error was the following ... but this one should be just as easy to figure out.

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1352 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...

> Configure project :app

Installing unimodules:
 unimodules-core@5.5.1 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/core
 unimodules-react-native-adapter@5.6.0 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/react-native-adapter
 expo-application@2.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-application
 expo-barcode-scanner@9.1.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-barcode-scanner
 expo-camera@9.1.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-camera
 expo-constants@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-constants
 expo-error-recovery@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-error-recovery
 expo-file-system@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-file-system
 expo-font@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-font
 expo-image-loader@1.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-image-loader
 expo-intent-launcher@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-intent-launcher
 expo-keep-awake@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-keep-awake
 expo-linear-gradient@8.3.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-linear-gradient
 expo-location@9.0.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-location
 expo-permissions@9.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-permissions
 expo-screen-orientation@2.0.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-screen-orientation
 expo-splash-screen@0.6.2 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-splash-screen
 expo-sqlite@8.4.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-sqlite
 expo-updates@0.3.5 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-updates
 unimodules-app-loader@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-app-loader
 unimodules-barcode-scanner-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-barcode-scanner-interface
 unimodules-camera-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-camera-interface
 unimodules-constants-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-constants-interface
 unimodules-face-detector-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-face-detector-interface
 unimodules-file-system-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-file-system-interface
 unimodules-font-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-font-interface
 unimodules-image-loader-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-image-loader-interface
 unimodules-permissions-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-permissions-interface
 unimodules-sensors-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-sensors-interface
 unimodules-task-manager-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-task-manager-interface

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* Where:
Build file '/home/jmiranda/git/openboxes-mobile/node_modules/react-native-reanimated/android/build.gradle' line: 89

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/jmiranda/git/openboxes-mobile/android/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 45s

@jmiranda
Copy link
Member Author

Add a local.properties to the android directory with sdk.dir pointing to the directory where adb is located

sdk.dir=/usr/lib/android-sdk/platform-tools

@jmiranda
Copy link
Member Author

Next issue

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1352 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...

> Configure project :app

 expo-permissions@9.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-permissions
 expo-screen-orientation@2.0.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-screen-orientation
 expo-splash-screen@0.6.2 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-splash-screen
 expo-sqlite@8.4.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-sqlite
 expo-updates@0.3.5 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-updates
 unimodules-app-loader@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-app-loader
 unimodules-barcode-scanner-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-barcode-scanner-interface
 unimodules-camera-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-camera-interface
 unimodules-constants-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-constants-interface
 unimodules-face-detector-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-face-detector-interface
 unimodules-file-system-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-file-system-interface
 unimodules-font-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-font-interface
 unimodules-image-loader-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-image-loader-interface
 unimodules-permissions-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-permissions-interface
 unimodules-sensors-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-sensors-interface
 unimodules-task-manager-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-task-manager-interface

> Configure project :react-native-reanimated
Observed package id 'platform-tools' in inconsistent location '/usr/lib/android-sdk/platform-tools' (Expected '/usr/lib/android-sdk/platform-tools/platform-tools')
Observed package id 'platform-tools' in inconsistent location '/usr/lib/android-sdk/platform-tools' (Expected '/usr/lib/android-sdk/platform-tools/platform-tools')
Checking the license for package SDK Patch Applier v4 in /usr/lib/android-sdk/platform-tools/licenses
Warning: License for package SDK Patch Applier v4 not accepted.
Checking the license for package Android Emulator in /usr/lib/android-sdk/platform-tools/licenses
Warning: License for package Android Emulator not accepted.
Checking the license for package Android SDK Tools in /usr/lib/android-sdk/platform-tools/licenses
Warning: License for package Android SDK Tools not accepted.
Checking the license for package Android SDK Build-Tools 29.0.2 in /usr/lib/android-sdk/platform-tools/licenses
Warning: License for package Android SDK Build-Tools 29.0.2 not accepted.
Checking the license for package Android SDK Platform 29 in /usr/lib/android-sdk/platform-tools/licenses
Warning: License for package Android SDK Platform 29 not accepted.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* Where:
Build file '/home/jmiranda/git/openboxes-mobile/node_modules/react-native-reanimated/android/build.gradle' line: 89

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     patcher;v4 SDK Patch Applier v4
     emulator Android Emulator
     platforms;android-29 Android SDK Platform 29
     tools Android SDK Tools
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
  Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
  
  Using Android SDK: /usr/lib/android-sdk/platform-tools

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

@jmiranda
Copy link
Member Author

Accept all licenses one by one

sdkmanager --licenses

Or supersize your acceptance with a piped yes

yes | sdkmanager --licenses

@jmiranda
Copy link
Member Author

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1604 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...

> Configure project :app

Installing unimodules:
 unimodules-core@5.5.1 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/core
 unimodules-react-native-adapter@5.6.0 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/react-native-adapter
 expo-application@2.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-application
 expo-barcode-scanner@9.1.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-barcode-scanner
 expo-camera@9.1.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-camera
 expo-constants@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-constants
 expo-error-recovery@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-error-recovery
 expo-file-system@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-file-system
 expo-font@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-font
 expo-image-loader@1.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-image-loader
 expo-intent-launcher@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-intent-launcher
 expo-keep-awake@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-keep-awake
 expo-linear-gradient@8.3.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-linear-gradient
 expo-location@9.0.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-location
 expo-permissions@9.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-permissions
 expo-screen-orientation@2.0.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-screen-orientation
 expo-splash-screen@0.6.2 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-splash-screen
 expo-sqlite@8.4.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-sqlite
 expo-updates@0.3.5 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-updates
 unimodules-app-loader@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-app-loader
 unimodules-barcode-scanner-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-barcode-scanner-interface
 unimodules-camera-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-camera-interface
 unimodules-constants-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-constants-interface
 unimodules-face-detector-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-face-detector-interface
 unimodules-file-system-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-file-system-interface
 unimodules-font-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-font-interface
 unimodules-image-loader-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-image-loader-interface
 unimodules-permissions-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-permissions-interface
 unimodules-sensors-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-sensors-interface
 unimodules-task-manager-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-task-manager-interface

> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.

> Task :app:installDebug
01:14:02 V/ddms: execute: running am get-config
01:14:04 V/ddms: execute 'am get-config' on '19064521402185' : EOF hit. Read: -1
01:14:04 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'TC20 - 7.1.2' for app:debug
01:14:04 D/app-debug.apk: Uploading app-debug.apk onto device '19064521402185'
01:14:04 D/Device: Uploading file onto device '19064521402185'
01:14:04 D/ddms: Reading file permision of /home/jmiranda/git/openboxes-mobile/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
01:14:06 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
01:14:18 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '19064521402185' : EOF hit. Read: -1
01:14:18 V/ddms: execute: returning
01:14:18 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
01:14:18 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on '19064521402185' : EOF hit. Read: -1
01:14:18 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 28s
700 actionable tasks: 2 executed, 698 up-to-date
info Connecting to the development server...
info Starting the app on "19064521402185"...
Starting: Intent { cmp=com.openboxes.android/.MainActivity }
Done in 32.83s.

@jmiranda
Copy link
Member Author

jmiranda commented Aug 18, 2021

Error

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1352 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Installing the app...
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
Gradle 6.3 requires Java 8 or later to run. You are currently using Java 7.

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Solution

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

@jmiranda
Copy link
Member Author

jmiranda commented Aug 18, 2021

Problem

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1352 file(s) to forward-jetify. Using 8 workers...
BUILD SUCCESSFUL in 1m 11s
700 actionable tasks: 674 executed, 26 up-to-date
info Connecting to the development server...
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
info Starting the app on "19064521402185"...
Starting: Intent { cmp=com.openboxes.android/.MainActivity }
Done in 77.92s.

Solution

$ export PATH=$PATH:/home/jmiranda/Android/Sdk/platform-tools/
$ adb --version
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
Installed as /home/jmiranda/Android/Sdk/platform-tools/adb

@jmiranda
Copy link
Member Author

Error

Error connecting: GDBus.Error:org.freedesktop.DBus.Error.LimitsExceeded: The maximum number of active connections for UID 0 has been reached

Solution
TBD

@jmiranda
Copy link
Member Author

jmiranda commented Aug 18, 2021

Problem

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (expo_eject)]$ yarn android
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1604 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
04:26:08 D/DeviceMonitor: Opening adb connection
04:26:08 D/DeviceMonitor: Connected to adb for device monitoring

Solution

export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

See https://stackoverflow.com/questions/55677874/failed-to-launch-emulator-error-emulator-didnt-connect-within-60-seconds

$ emulator -list-avds
Nexus_5X_API_28
TestAVD

Should consider getting an emulator working with Android Studio as well.

@jmiranda
Copy link
Member Author

Problem

BUILD SUCCESSFUL in 48s
700 actionable tasks: 2 executed, 698 up-to-date
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
error Failed to start the app. Run CLI with --verbose flag for more details.
Error: spawnSync adb ENOENT
    at Object.spawnSync (internal/child_process.js:1070:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Solution
TBD

@jmiranda
Copy link
Member Author

jmiranda commented Aug 25, 2021

Successfully launched the app on my phone

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (develop)]$ yarn android 
yarn run v1.17.3
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1604 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...

> Configure project :app

Installing unimodules:
 unimodules-core@5.5.1 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/core
 unimodules-react-native-adapter@5.6.0 from /home/jmiranda/git/openboxes-mobile/node_modules/@unimodules/react-native-adapter
 expo-application@2.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-application
 expo-barcode-scanner@9.1.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-barcode-scanner
 expo-camera@9.1.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-camera
 expo-constants@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-constants
 expo-error-recovery@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-error-recovery
 expo-file-system@9.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-file-system
 expo-font@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-font
 expo-image-loader@1.2.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-image-loader
 expo-intent-launcher@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-intent-launcher
 expo-keep-awake@8.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-keep-awake
 expo-linear-gradient@8.3.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-linear-gradient
 expo-location@9.0.1 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-location
 expo-permissions@9.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-permissions
 expo-screen-orientation@2.0.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-screen-orientation
 expo-splash-screen@0.6.2 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-splash-screen
 expo-sqlite@8.4.0 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-sqlite
 expo-updates@0.3.5 from /home/jmiranda/git/openboxes-mobile/node_modules/expo-updates
 unimodules-app-loader@1.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-app-loader
 unimodules-barcode-scanner-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-barcode-scanner-interface
 unimodules-camera-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-camera-interface
 unimodules-constants-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-constants-interface
 unimodules-face-detector-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-face-detector-interface
 unimodules-file-system-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-file-system-interface
 unimodules-font-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-font-interface
 unimodules-image-loader-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-image-loader-interface
 unimodules-permissions-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-permissions-interface
 unimodules-sensors-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-sensors-interface
 unimodules-task-manager-interface@5.3.0 from /home/jmiranda/git/openboxes-mobile/node_modules/unimodules-task-manager-interface

> Task :app:installDebug
09:15:57 V/ddms: execute: running am get-config
09:15:58 V/ddms: execute 'am get-config' on '19064521402185' : EOF hit. Read: -1
09:15:58 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'TC20 - 7.1.2' for app:debug
09:15:58 D/app-debug.apk: Uploading app-debug.apk onto device '19064521402185'
09:15:58 D/Device: Uploading file onto device '19064521402185'
09:15:58 D/ddms: Reading file permision of /home/jmiranda/git/openboxes-mobile/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
09:16:01 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
09:16:11 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '19064521402185' : EOF hit. Read: -1
09:16:11 V/ddms: execute: returning
09:16:11 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
09:16:12 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on '19064521402185' : EOF hit. Read: -1
09:16:12 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 25s
700 actionable tasks: 2 executed, 698 up-to-date
info Connecting to the development server...
info Starting the app on "19064521402185"...
Starting: Intent { cmp=com.openboxes.android/.MainActivity }
Done in 30.15s.

But received the following error
Screenshot_20210824-211951

@chetanmaharishi Can you take a look at the screenshot and let me know what you think.

@jmiranda
Copy link
Member Author

I ran the following in the android directory

./gradlew clean 

and then

yarn android

and now I'm seeing this screen
Screenshot_20210824-213214

@jmiranda
Copy link
Member Author

Starting the metro server manually seemed to allow the application to load the index bundle.

[jmiranda@jmiranda-ThinkPad-W540 openboxes-mobile (develop)]$ npx react-native start

But I'm still getting the same blank screen (see below).

@jmiranda
Copy link
Member Author

@chetanmaharishi any thoughts on how to debug this?

@jmiranda
Copy link
Member Author

Nevermind, I finally got it working after a few tries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants