Skip to content

Error when installing dev release 3.27.0 #12253

Description

@exstntlmsnthrp

⚠️ 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

Activity

  1. joshtrichards commented on Dec 8, 2023

    @joshtrichards
    Member

    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.

  2. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member

    @alperozturk96 @tobiasKaminsky I suspect this comes from bumping the target sdk to 34

  3. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    Member

    Yes its related with targetSDK 34 when we receive broadcast we need to specify explicitly. I will create PR asap.

  4. linked a pull request that will close this issueFix Crash Register Broadcast #12257on Dec 8, 2023
  5. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    @exstntlmsnthrp Could you try with this branch?

  6. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    @AndyScherzinger We need to check Android-library as well, fyi. I will check it.

  7. exstntlmsnthrp commented on Dec 8, 2023

    @exstntlmsnthrp
    Author

    @exstntlmsnthrp Could you try with this branch?

    @alperozturk96 No, that branch also fails. Here's the debug:

    type: crash
    osVersion: google/cheetah/cheetah:14/UQ1A.231205.015/2023120701:user/release-keys
    package: com.nextcloud.android.qa:12257
    process: com.nextcloud.android.qa
    processUptime: 3343 + 52 ms
    installer: com.android.packageinstaller
    
    java.lang.RuntimeException: Unable to resume activity {com.nextcloud.android.qa/com.owncloud.android.authentication.AuthenticatorActivity}: java.lang.SecurityException: com.nextcloud.android.qa: 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:4999)
    	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5032)
    	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:2455)
    	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:8216)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
    Caused by: java.lang.SecurityException: com.nextcloud.android.qa: 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:1499)
    	at android.app.Activity.onResume(Activity.java:2085)
    	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:8825)
    	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4989)
    	... 13 more
    Caused by: android.os.RemoteException: Remote stack trace:
    	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14075)
    	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2578)
    	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2767)
    	at android.os.Binder.execTransactInternal(Binder.java:1361)
    	at android.os.Binder.execTransact(Binder.java:1302)
    
    
    
  8. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    @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

    p
  9. tobiasKaminsky commented on Dec 8, 2023

    @tobiasKaminsky
    Member

    HWSecurity is used for 2fa during login.

  10. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    HWSecurity is used for 2fa during login.

    Can we fork and use it as AAR file?

  11. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member

    Can we fork and use it as AAR file?

    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

    • fork for a quick fix, potentially going back when upstream release
    • look for an alternative

    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.

  12. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    Can we fork and use it as AAR file?

    Given zero responses in cotechde/hwsecurity#5 I suppose we kind of have to I fear. But looping in @dschuermann for feedback. Given it breaks Android 14 we either

    • fork for a quick fix, potentially going back when upstream release
    • look for an alternative

    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.

    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?

  13. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member
  14. tobiasKaminsky commented on Dec 8, 2023

    @tobiasKaminsky
    Member

    Found the same :)
    We are working on it.

  15. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member

    😆

  16. alperozturk96 commented on Dec 8, 2023

    @alperozturk96
    Collaborator

    Great I will create PR with fix asap

  17. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member

    Awesome finding btw @alperozturk96 👍

  18. dschuermann commented on Dec 8, 2023

    @dschuermann
    Member

    Hey, yeah sorry, hwsecurity development is frozen right now.

  19. AndyScherzinger commented on Dec 8, 2023

    @AndyScherzinger
    Member

    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 🙏

  20. tobiasKaminsky commented on Dec 11, 2023

    @tobiasKaminsky
    Member

    @exstntlmsnthrp can you try this #12263 (comment) ?

    Many thanks for your help!

  21. joshtrichards commented on Dec 11, 2023

    @joshtrichards
    Member

    Fixes crash for me.

  22. exstntlmsnthrp commented on Dec 11, 2023

    @exstntlmsnthrp
    Author

    @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.

  23. linked a pull request that will close this issueHwsecurity bump #12263on Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions