question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile error - promise

See original GitHub issue
  1. What version of RN and react-native-fcm are you running? RN: 0.56.0 / React-Native-FCM: 16.2.1
  2. What device are you using? (e.g iOS9 emulator, Android 6 device)? Android 8.0 device
  3. Is your app running in foreground, background or not running? Not compiling

When I create an react native app with react-native init and add react-native-fcm with npm, I cannot compile the projet with react-native run-android

Logs:

:react-native-fcm:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:217: error: cannot find symbol
            promise.resolve(null);
            ^
  symbol:   variable promise
  location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:220: error: cannot find symbol
            promise.reject(null,e.getMessage());
            ^
  symbol:   variable promise
  location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:228: error: cannot find symbol
            promise.resolve(null);
            ^
  symbol:   variable promise
  location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:231: error: cannot find symbol
            promise.reject(null,e.getMessage());
            ^
  symbol:   variable promise
  location: class FIRMessagingModule
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
:react-native-fcm:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-fcm:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

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

BUILD FAILED

Step to reproduce:

  • react-native init {name}
  • npm i --save react-native-fcm
  • react-native link
  • react-native run-android

Ps: I’m a newbie to react native and firecloud

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
wynchcommented, Sep 10, 2018

This change came from version 16.2.1…

You can fix that by changing your dependency in your package.json : “react-native-fcm” : “16.2.0” (important : remove the ^ to force this exact version)

1reaction
evollucommented, Sep 12, 2018

fixed in 16.2.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compilation error with promise - typescript - Stack Overflow
When I compile this file I get the following error: 44:16 - error TS2693: 'Promise' only refers to a type, but is being...
Read more >
Unexpected compile / type error when using Promise.all #35136
Compile error: "Property 'data' does not exist on type 'RandomType'." Seems to still compile the js file even though it shows a compile...
Read more >
WebAssembly.compileStreaming() - MDN Web Docs
A Response object or a promise that will fulfill with one, representing the underlying source of a .wasm module you want to stream...
Read more >
Best Practices for Node.js Error-handling - Toptal
In this article, Toptal Full-stack Developer Jay Huang will introduce you to error-handling in Node.js and demonstrate how you can build a robust ......
Read more >
Using .then(), .catch(), .finally() to Handle Errors in Javascript ...
A Promise executes immediately and either resolves to a single value, or rejects with an error object. If the promise is rejected, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found