Repository navigation
Labels
Milestone
Description
⚠️ Before posting ⚠️
- This is a bug, not a question or an enhancement.
- I've searched for similar issues and didn't find a duplicate.
- I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
This is a new report as requested in #12229.
Expected behaviour
Please see below or #12229
Actual behaviour
See previous
Android version
14 - GrapheneOS
Device brand and model
Pixel 7 Pro
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
3.27.0
Nextcloud server version
27
Using a reverse proxy?
No
Android logs
No response
Server error logs
No response
Additional information
I don't know if you want a new bug opened for this or if it's appropriate to post here. I've installed the release candidate (Android 14, GrapheneOS, Pixel 7 Pro) from GitHub and I've two issues. The first is it conflicts with the previous release candidate and I had to uninstall the previous in order to update. Secondly, the app will not open. Keeps crashing with the following log.
### Cause of error
```java
Exception in thread "main" java.lang.RuntimeException: Unable to resume activity {com.nextcloud.client/com.owncloud.android.authentication.AuthenticatorActivity}: java.lang.SecurityException: com.nextcloud.client: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4979)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5012)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2450)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8199)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: Exception in thread "main" java.lang.SecurityException: com.nextcloud.client: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3066)
at android.os.Parcel.createException(Parcel.java:3050)
at android.os.Parcel.readException(Parcel.java:3026)
at android.os.Parcel.readException(Parcel.java:2968)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5699)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1883)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1823)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1811)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
at de.cotech.hw.internal.transport.usb.UsbConnectionDispatcher.onResume(UsbConnectionDispatcher.java:113)
at de.cotech.hw.SecurityKeyManager$DispatcherActivityLifecycleCallbacks.onActivityResumed(SecurityKeyManager.java:281)
at android.app.Application.dispatchActivityResumed(Application.java:437)
at android.app.Activity.dispatchActivityResumed(Activity.java:1489)
at android.app.Activity.onResume(Activity.java:2075)
at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:309)
at com.owncloud.android.authentication.AuthenticatorActivity.onResume(AuthenticatorActivity.java:727)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1608)
at android.app.Activity.performResume(Activity.java:8799)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4969)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5012)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2450)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8199)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: Exception in thread "main" android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14007)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2578)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2724)
at android.os.Binder.execTransactInternal(Binder.java:1368)
at android.os.Binder.execTransact(Binder.java:1299)
App information
- ID:
com.nextcloud.client - Version:
30270051 - Build flavor:
generic
Device information
- Brand:
google - Device:
cheetah - Model:
Pixel 7 Pro - Id:
UP1A.231105.003 - Product:
cheetah
Firmware
- SDK:
34 - Release:
14 - Incremental:
2023112900
Reacted by Josh
Activity
joshtrichards commentedon Dec 8, 2023
Confirmed. I can trigger this on-demand as well, without doing a new install, by trying to add another account in latest Dev from F-Droid.
AndyScherzinger commentedon Dec 8, 2023
@alperozturk96 @tobiasKaminsky I suspect this comes from bumping the target sdk to 34
alperozturk96 commentedon Dec 8, 2023
Yes its related with targetSDK 34 when we receive broadcast we need to specify explicitly. I will create PR asap.
alperozturk96 commentedon Dec 8, 2023
@exstntlmsnthrp Could you try with this branch?
alperozturk96 commentedon Dec 8, 2023
@AndyScherzinger We need to check Android-library as well, fyi. I will check it.
exstntlmsnthrp commentedon Dec 8, 2023
@alperozturk96 No, that branch also fails. Here's the debug:
alperozturk96 commentedon Dec 8, 2023
@AndyScherzinger @tobiasKaminsky We are using HWSecurity library and obviously even latest version 4.4.0 (24 Mar 2021) not handling broadcast receiver for Android 14. We need to fork this library and update the codebase if this library so vital or we can get rid of this library. What do you think?
Issue created in their Github page
tobiasKaminsky commentedon Dec 8, 2023
HWSecurity is used for 2fa during login.
alperozturk96 commentedon Dec 8, 2023
Can we fork and use it as AAR file?
AndyScherzinger commentedon Dec 8, 2023
Given zero responses in hwsecurity-sdk/hwsecurity#5 I suppose we kind of have to I fear. But looping in @dschuermann for feedback. Given it breaks Android 14 we either
So to not loose time @alperozturk96 is it easily possible to fork and build ourselves - just in case we have to go down that road, fingers crossed we don't? However see #8933 4.4.0 is broken, so we would need to fix it for the version we use.
alperozturk96 commentedon Dec 8, 2023
Fix is simple we are just going to add one more parameter. It's my prediction, if some other things not surprise us. Or basically we can reduce targetSDKLevel to 33. Which version we are using exactly? 4.3.0?
AndyScherzinger commentedon Dec 8, 2023
https://github.com/nextcloud/android/blob/master/build.gradle#L17
-> 4.1.0-patch1 @alperozturk96
AndyScherzinger commentedon Dec 8, 2023
Turns out we already did have to fork...
-> https://github.com/nextcloud-deps/hwsecurity
tobiasKaminsky commentedon Dec 8, 2023
Found the same :)
We are working on it.
AndyScherzinger commentedon Dec 8, 2023
😆
alperozturk96 commentedon Dec 8, 2023
Great I will create PR with fix asap
AndyScherzinger commentedon Dec 8, 2023
Awesome finding btw @alperozturk96 👍
dschuermann commentedon Dec 8, 2023
Hey, yeah sorry, hwsecurity development is frozen right now.
AndyScherzinger commentedon Dec 8, 2023
Hi @dschuermann
thanks a lot for the feedback, highly appreciate it. Hope all is well for you, no worries about it - yet good to know.
If you folks ever pick it up again and want the changes up-streamed, just give us a ping 👍
Great work you did in creating this library is very much appreciated 🙏
tobiasKaminsky commentedon Dec 11, 2023
@exstntlmsnthrp can you try this #12263 (comment) ?
Many thanks for your help!
joshtrichards commentedon Dec 11, 2023
Fixes crash for me.
exstntlmsnthrp commentedon Dec 11, 2023
@tobiasKaminsky Yes! I can confirm that QA version works as expected and I successfully logged into my NC27 instance without any problems. Thank you and I'm glad to help test. It's the least I can do, since I have no dev skills.