Comments (13)
I think the fix to #13 should fix this as well, let me know if not (release coming soon)
from assent.
Huh, I'm having trouble reproducing this on my Pixel 3 with Android Q
from assent.
I'm also getting this crash. When I run runWithPermissions
from a Fragment inside a Fragment pager adapter
from assent.
On further investigation it only happens when I upgrade to navigation components 2.1.0-alpha02. This uses the androidx fragments which must cause this bug
from assent.
I use AndroidX Fragments and have not observed any problems.
from assent.
Which version? Navigation components currently only depends on androidx.fragment:fragment:1.1.0-alpha05
maybe they fixed it in alpha06 or 07. Could you test with alpha05?
from assent.
To further clarify, Navigation version 1.0.0 works, but Navigation 2.1.0-alpha02 doesn't
from assent.
I meant specifically indidual AndroidX Fragments (androidx.app.Fragment
), not the dependency there or anything navigation related.
from assent.
Sorry if I wasn't clear. I'm talking about the androidx.app.Fragment
also. It has different versions released via jetpack now. I only mentioned Navigation because it internally depends on different versions of fragment. I've narrowed the crash down to happening if you depend on "androidx.fragment:fragment:1.1.0-alpha05"
(or alpha06
or alpha07
) but it doesn't happen if you depend on implementation "androidx.fragment:fragment:1.1.0-alpha04"
.
from assent.
Does any of this sounds suspiscious ? https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0-alpha05
from assent.
So the crash is obviously related to the change in fragment alpha05
in the above link.
"Calling remove(), hide(), show(), detach(), and setPrimaryNavigationFragment() with a Fragment attached to a different FragmentManager now throws an IllegalStateException rather than silently failing (aosp/904301)"
I had a look at your code to see if I could make a PR but couldn't see the solution. Looking forward to a fix. Cheers
from assent.
I'm getting the same error when calling it from within a DialogFragment
.
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=65596, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {at.guger.moneybook.dev/at.guger.moneybook.ui.activity.MainActivity}: java.lang.IllegalStateException: Cannot detach Fragment attached to a different FragmentManager. Fragment PermissionFragment{e597fd5 (a8933ae6-618e-41cd-be92-64617c72530a) [assent_permission_fragment/fragment]} is already attached to a FragmentManager.
I'm using AndroidX libraries:
Navigation: 2.1.0-alpha03
Fragment: 1.1.0-alpha08
from assent.
Yeah works for me!
from assent.
Related Issues (20)
- Activity instance will become null when switching between Activities HOT 2
- Detect "denied permanently" permissions HOT 9
- Crash when saving state with Jetpack Navigation components HOT 7
- [Question] Is it possible to use your library in a pure Java Android project? HOT 1
- Crash when requesting permissions in fragment onViewCreated HOT 4
- Support Android 10 permissions
- Crash when requesting permission and rotating device HOT 1
- Issue with runWithPermissions / permanently denied in 3.0 RC3 HOT 2
- Permission Enum doesn't contain all permissions. HOT 1
- Even though it's allowed for Android 7 it keeps asking repeatedly.
- Migration from JCenter HOT 1
- Upgrading this library broke the functionality: androidx.fragment:fragment-ktx:1.3.0
- Result callback not getting triggered HOT 1
- Can't seem to ask for user location permission HOT 1
- Error build Material Dialogs and Assent
- `askForPermissions` isn't triggering the `AssentResult` callback on Android 11? HOT 1
- Fatal Exception: java.lang.IllegalStateException FragmentManager is already executing transactions
- Rationale message HOT 1
- Support for AndroidX HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assent.