App crashes frequently - java.lang.IllegalStateException: Fragment CameraActivity{474e0e8} not attached to Activity
See original GitHub issueHi… I need some help.
My app crashes frequently…
Exception java.lang.IllegalStateException: Fragment CameraActivity{474e0e8} not attached to Activity
It’s Android, all versions, multiple models. Usually I get it on app startup, but sometimes later…
Functions: ` grantPermission: function(node) { cordova.plugins.diagnostic.requestCameraAuthorization({ successCallback: function(status){ console.log("Authorization request for camera use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? “granted” : “denied”)); Photocamera.permissionGranted = true; Photocamera.startCamera(node); //TriggerEvent(‘cameraOnOff’,{type:‘on’}); }, errorCallback: function(error){ console.error(error); }, externalStorage: false }); },
startCamera: function(node) {
if (this.permissionGranted == true) {
CameraPreview.startCamera({x: 0, y: document.getElementById(node).clientHeight - window.screen.width, width: window.screen.width, height: window.screen.height, camera: CameraPreview.CAMERA_DIRECTION.BACK, toBack: true, previewDrag: false, tapPhoto: false});
CameraPreview.show();
}
},
takePicture: function() {
CameraPreview.takePicture({quality: 85}, function(base64PictureData){
imageSrcData = 'data:image/jpeg;base64,' +base64PictureData;
PhotoView.showPhotoView(imageSrcData);
CameraPreview.stopCamera();
});
TriggerEvent('showLoader');
},
`
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
java.lang.IllegalStateException: Fragment not attached to Activity
This error happens due to the combined effect of two factors: The HTTP request, when complete, invokes either onResponse() or onError() (which work...
Read more >Android Fragment not attached to a context | by Weidian Huang
This is a common issue if we don't take care of it in our application, and it is difficult to catch the issue...
Read more >java.lang.IllegalStateException: Fragment not attached to Activity
Android : java. lang. IllegalStateException : Fragment not attached to Activity [ Beautify Your Computer ...
Read more >The setUserVisibleHint() is crashing with Fragment not ...
0) is crashing with a "Fragment not attached to Activity". I tested on API levels 16 and 23. @Override public void setUserVisibleHint(boolean isVisibleToUser)...
Read more >1039471 - crash in java.lang.IllegalStateException: Fragment ...
lang.IllegalStateException: Fragment RecentTabsPanel{422715c0} not attached to Activity at android.support.v4.app.Fragment.getLoaderManager(Fragment.java).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
not yet. I will apply today v0.10.0, will keep you updated.
no updates here, 42 hits this week on our main app (~150000 Android users)
does anyone has a feedback on this using v0.10.0?