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

🐛 Runtime error: No identifiers allowed directly after numeric literal #464

Open
3 of 4 tasks
CyberCyclone opened this issue Oct 2, 2024 · 2 comments
Open
3 of 4 tasks

Comments

@CyberCyclone
Copy link

What's happening?

When attempting to use this package, I'm seeing the below error;

No identifiers allowed directly after numeric literal.

Screenshot_20241003_085627

I haven't been able to test this in the example project. I've never used the "bun" package manager and being a non-standard package manager (rather then npm or yarn), I'm not familiar with it's workings and I was constantly getting build errors (I solve one, then another comes up).

Our project is using react-native 0.73.6.

Reproducible Code

const signature = QuickCrypto.createHmac("sha256", sharedKey)
    .update(signingString)
    .digest("base64");

Relevant log output

2024-10-03 09:00:14.184 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call from JS
                                                                                                    com.facebook.react.devsupport.JSException: No identifiers allowed directly after numeric literal
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    Caused by: com.facebook.jni.CppException: No identifiers allowed directly after numeric literal
                                                                                                    
                                                                                                    no stack
                                                                                                    	... 8 more
2024-10-03 09:00:14.190 29410-29410 Compatibil...geReporter com.company.debug                    D  Compat change id reported: 171228096; UID 10443; state: ENABLED
2024-10-03 09:00:14.203 29410-29522 ReactNativeJNI          com.company.debug                    E  Attempting to call JS function on a bad application bundle: HMRClient.setup()
2024-10-03 09:00:14.208 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call
                                                                                                    java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: HMRClient.setup()
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2024-10-03 09:00:14.209 29410-29522 ReactNativeJNI          com.company.debug                    E  Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()
2024-10-03 09:00:14.211 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call
                                                                                                    java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2024-10-03 09:00:14.211 29410-29522 ReactNativeJNI          com.company.debug                    E  Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
2024-10-03 09:00:14.213 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call
                                                                                                    java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2024-10-03 09:00:14.213 29410-29522 ReactNativeJNI          com.company.debug                    E  Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
2024-10-03 09:00:14.215 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call
                                                                                                    java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2024-10-03 09:00:14.215 29410-29522 ReactNativeJNI          com.company.debug                    E  Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
2024-10-03 09:00:14.217 29410-29522 unknown:ReactNative     com.company.debug                    E  Exception in native call
                                                                                                    java.lang.RuntimeException: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)

Device

Samsung Galaxy Tab S8

QuickCrypto Version

0.7.5

Can you reproduce this issue in the QuickCrypto Example app?

No, I cannot reproduce the issue in the Example app

Additional information

@CyberCyclone
Copy link
Author

I figured out a "solution" faster then I expected. In the gradle.properties, we have hermesEnabled set to false since Hermes is a lot slower then JSC for our type of app.

I still haven't been able to build the example to test this, however I have been able to run our project with using this package with Hermes.

I understand that since Hermes is the default now and JSC usage is low, however it would be interesting to see if this can be easily resolved so JSC users can use this package. If not, then can we please have this added to the troubleshooting guide? The error message is extremely unhelpful and I only tried Hermes based on a hunch.

@boorad
Copy link
Collaborator

boorad commented Oct 6, 2024

I spent almost a week trying to solve it, hitting the same errors you're getting. I just gave up :(

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