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

[android]: Crash - NullPointerException #31

Open
teivienn opened this issue Jul 19, 2024 · 0 comments
Open

[android]: Crash - NullPointerException #31

teivienn opened this issue Jul 19, 2024 · 0 comments

Comments

@teivienn
Copy link

Hi, In the production release, I get an error when opening the application. It doesn't always work with a frequency of 1 out of 5 times.

import { setup } from '@baronha/ting';
import BootSplash from 'react-native-bootsplash';

setup({
  toast: {
    position: 'top',
    backgroundColor: '#f2f6fc',
  },
  alert: {
    backgroundColor: '#f2f6fc',
  },
});


const App = () => {
   return (
      <NavigationContainer
           onReady={() => {
              BootSplash.hide({ fade: true });
            }}>
              <RootRouter />
       </NavigationContainer>
    )
}
  • firebase crashlytics log
          Fatal Exception: com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get for prop 'Ting': java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference, js engine: hermes, stack:
anonymous@1:891672
loadModuleImplementation@1:74585
guardedLoadModule@1:74127
metroRequire@1:73749
anonymous@1:891069
loadModuleImplementation@1:74585
guardedLoadModule@1:74127
metroRequire@1:73749
anonymous@1:744375
loadModuleImplementation@1:74585
guardedLoadModule@1:74127
metroRequire@1:73749
anonymous@1:744095
loadModuleImplementation@1:74585
guardedLoadModule@1:74084
metroRequire@1:73749
anonymous@1:80523
componentProviderInstrumentationHook@1:280618
anonymous@1:280950
runApplication@1:281498
__callFunction@1:87142
anonymous@1:85447
__guard@1:86403
callFunctionReturnFlushedQueue@1:85405

       at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:65)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:146)
       at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
       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:27)
       at android.os.Looper.loopOnce(Looper.java:224)
       at android.os.Looper.loop(Looper.java:318)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:233)
       at java.lang.Thread.run(Thread.java:1012)
        

  • React native Info
System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 92.38 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.9.0
    path: /usr/local/bin/node
  Yarn:
    version: 4.1.0
    path: /usr/local/bin/yarn
  npm:
    version: 10.1.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.04.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "33"
      - "34"
    Build Tools:
      - 30.0.0
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
    System Images:
      - android-33-ext5 | Google Play ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/nei/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.2
    wanted: 0.74.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

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

1 participant