You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're having this violation every time when we cold start our app
StrictMode: StrictMode policy violation; ~duration=4094 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65599 violation=2
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1440)
at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
at java.io.File.exists(File.java:807)
at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:572)
at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:563)
at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:519)
at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:714)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:368)
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
at com.facebook.react.modules.i18nmanager.I18nUtil.isPrefSet(I18nUtil.java:97)
at com.facebook.react.modules.i18nmanager.I18nUtil.isRTLForced(I18nUtil.java:81)
at com.facebook.react.modules.i18nmanager.I18nUtil.isRTL(I18nUtil.java:48)
at com.facebook.react.uimanager.UIImplementation.createRootShadowNode(UIImplementation.java:122)
at com.facebook.react.uimanager.UIImplementation.registerRootView(UIImplementation.java:200)
at com.facebook.react.uimanager.UIManagerModule.addRootView(UIManagerModule.java:311)
at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1037)
at com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:752)
at com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:444)
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:300)
I'm not entirely sure why does it take that long to access SharedPreferences instance, might be due to a big SharedPrefs file. Would it be possible to somehow move it off the main thread?
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks for taking the time to create this issue. This issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.
I'm not sure why this prefs file would take that long to read and as far as I can tell I don't think it's a file size issue; looking at the source this is a limited prefs file for a small number of items.
Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗
Environment
OS: macOS 10.14
Node: 8.12.0
Yarn: 1.10.1
npm: 6.4.1
Watchman: 4.9.0
Xcode: Xcode 10.0 Build version 10A255
Android Studio: 3.2 AI-181.5540.7.32.5014246
Packages: (wanted => installed)
react: 16.6.1 => 16.6.1
react-native: 0.57.5 => 0.57.5
Description
We're having this violation every time when we cold start our app
I'm not entirely sure why does it take that long to access SharedPreferences instance, might be due to a big SharedPrefs file. Would it be possible to somehow move it off the main thread?
Thanks!
The text was updated successfully, but these errors were encountered: