NPE at application startup
This bug was recorded by Google Play. The crash happens at injection time, possibly before our own crash reporter is initialised.
- Android version: 11
- Phone models: Motorola Moto G Power, Redmi Note 8 Pro, OnePlus Nord N10 5G, Xiaomi Mi A3, OnePlus 7
- Briar versions: 1.4.3, 1.4.4 (Google Play)
Stacktrace:
java.lang.RuntimeException:
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7029)
at android.app.ActivityThread.access$1700 (ActivityThread.java:274)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2098)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:233)
at android.app.ActivityThread.main (ActivityThread.java:8063)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:978)
Caused by: java.lang.NullPointerException:
at java.net.NetworkInterface.getAll (NetworkInterface.java:498)
at java.net.NetworkInterface.getNetworkInterfaces (NetworkInterface.java:398)
at org.briarproject.bramble.system.AbstractSecureRandomProvider.writeToEntropyPool (AbstractSecureRandomProvider.java:28)
at org.briarproject.bramble.system.AndroidSecureRandomProvider.writeToEntropyPool (AndroidSecureRandomProvider.java:41)
at org.briarproject.bramble.system.UnixSecureRandomProvider.writeSeed (UnixSecureRandomProvider.java:49)
at org.briarproject.bramble.system.AndroidSecureRandomProvider.writeSeed (AndroidSecureRandomProvider.java:64)
at org.briarproject.bramble.system.UnixSecureRandomProvider.getProvider (UnixSecureRandomProvider.java:41)
at org.briarproject.bramble.crypto.CryptoComponentImpl.<init> (CryptoComponentImpl.java:83)
at org.briarproject.bramble.crypto.CryptoModule.provideCryptoComponent (CryptoModule.java:32)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.provideCryptoComponent (CryptoModule_ProvideCryptoComponentFactory.java:42)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.get (CryptoModule_ProvideCryptoComponentFactory.java:31)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.get (CryptoModule_ProvideCryptoComponentFactory.java:10)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
at org.briarproject.bramble.sync.MessageFactoryImpl_Factory.get (MessageFactoryImpl_Factory.java:21)
at org.briarproject.bramble.sync.MessageFactoryImpl_Factory.get (MessageFactoryImpl_Factory.java:8)
at org.briarproject.bramble.sync.SyncModule_ProvideMessageFactoryFactory.get (SyncModule_ProvideMessageFactoryFactory.java:26)
at org.briarproject.bramble.sync.SyncModule_ProvideMessageFactoryFactory.get (SyncModule_ProvideMessageFactoryFactory.java:9)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseFactory.get (DatabaseModule_ProvideDatabaseFactory.java:36)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseFactory.get (DatabaseModule_ProvideDatabaseFactory.java:12)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseComponentFactory.get (DatabaseModule_ProvideDatabaseComponentFactory.java:40)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseComponentFactory.get (DatabaseModule_ProvideDatabaseComponentFactory.java:13)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl_Factory.get (LifecycleManagerImpl_Factory.java:30)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl_Factory.get (LifecycleManagerImpl_Factory.java:10)
at org.briarproject.bramble.lifecycle.LifecycleModule_ProvideLifecycleManagerFactory.get (LifecycleModule_ProvideLifecycleManagerFactory.java:26)
at org.briarproject.bramble.lifecycle.LifecycleModule_ProvideLifecycleManagerFactory.get (LifecycleModule_ProvideLifecycleManagerFactory.java:9)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
at org.briarproject.bramble.cleanup.CleanupModule_ProvideCleanupManagerFactory.get (CleanupModule_ProvideCleanupManagerFactory.java:35)
at org.briarproject.bramble.cleanup.CleanupModule_ProvideCleanupManagerFactory.get (CleanupModule_ProvideCleanupManagerFactory.java:11)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
at org.briarproject.briar.android.DaggerAndroidComponent.injectEagerSingletons (DaggerAndroidComponent.java:2556)
at org.briarproject.briar.android.DaggerAndroidComponent.inject (DaggerAndroidComponent.java:2066)
at org.briarproject.bramble.BrambleCoreEagerSingletons$Helper.injectEagerSingletons (BrambleCoreEagerSingletons.java:48)
at org.briarproject.briar.android.BriarApplicationImpl.createApplicationComponent (BriarApplicationImpl.java:97)
at org.briarproject.briar.android.BriarApplicationImpl.onCreate (BriarApplicationImpl.java:64)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1208)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7024)
This looks like a framework bug that we could work around by catching the exception.