twilio / twilio-voice-react-native-app

Other
32 stars 15 forks source link

Cannot invoke "Object.toString()" because "value" is null #72

Closed kjdfjhdjkh closed 1 year ago

kjdfjhdjkh commented 1 year ago

Hello,

I'm following the instructions in twilio-voice-react-native-app/app/README.md and when I perform the yarn android command, I get the following:

E:\android_projects\TwilioVoiceReactNativeReferenceApp\app>yarn android
yarn run v1.22.19
$ react-native run-android
info Starting JS server...
info Installing the app...

> Configure project :app
Reading env from: .env

> Configure project :react-native-auth0
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 up-to-date
<-------------> 0% WAITING
> IDLE

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not create task ':app:generateDebugLintModel'.
      > Cannot invoke "Object.toString()" because "value" is null

* 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 11s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not create task ':app:generateDebugLintModel'.
      > Cannot invoke "Object.toString()" because "value" is null

* 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 11s

    at makeError (E:\android_projects\TwilioVoiceReactNativeReferenceApp\app\node_modules\execa\index.js:174:9)
    at E:\android_projects\TwilioVoiceReactNativeReferenceApp\app\node_modules\execa\index.js:278:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (E:\android_projects\TwilioVoiceReactNativeReferenceApp\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (E:\android_projects\TwilioVoiceReactNativeReferenceApp\app\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

E:\android_projects\TwilioVoiceReactNativeReferenceApp\app>

I'm using yarn version 1.22.19 and Node 18.16.0.

kjdfjhdjkh commented 1 year ago

Apparently I was using the wrong .env file 😳