# Ziti Network JWT Enrollment fails on Android when loaded from NextCloud

**URL:** <https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310>\
**Category:** Ziti Mobile Edge for Android\
**Created:** [April 6, 2025, 8:29pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310 "2025-04-06T20:29:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![007bond007](https://avatars.discourse-cdn.com/v4/letter/0/3be4f8/32.png) [@007bond007](https://openziti.discourse.group/u/007bond007)\
**Post date:** [April 6, 2025, 8:29pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/1 "2025-04-06T20:29:55Z")

</div>

Hello,

I am right on top of bug hunting lately! During troubleshooting for an un-related issue, I cleared out my android app data for ziti (so, starting "fresh") and tried to load the network JWT into the app from my Nextcloud folders (I have Nextcloud installed on my Android device - and it shows up in the file browser), and Open Ziti's Tunneler app does not do anything (No visible error messages, no new identities added) and if I try to add it again, the app crashes.

I can workaround it by going into Nextcloud, exporting (which 'saves' it to your download folder in Android) the JWT file and then loading into the tunneler app. Everything is good at this point. Not sure why the location of the file matters for Ziti, but seems like it could be a bug.

Feedback logs were sent via support email moments ago.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 7, 2025, 7:16pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/2 "2025-04-07T19:16:25Z")

</div>

Hi @007bond007,

I believe I replied to your email, but with this extra details my reply is probably wrong. (assuming that was you I replied to)

I see the "FATAL EXCEPTION" in the logs:

```auto
04-06 16:07:49.962 20599 20599 E AndroidRuntime: Caused by: android.os.NetworkOnMainThreadException
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3271)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3245)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3228)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:201)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:164)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:814)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2043)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1858)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at android.content.ContentResolver.openInputStream(ContentResolver.java:1528)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at org.openziti.mobile.ZitiEnrollmentActivity.enroll(ZitiEnrollmentActivity.kt:123)
04-06 16:07:49.962 20599 20599 E AndroidRuntime: at org.openziti.mobile.ZitiEnrollmentActivity.onCreate$lambda$6(ZitiEnrollmentActivity.kt:67)

```

It'll be tough to reproduce just because we don't have a NextCloud install laying around to try with 🙂

Sometimes looking at the stack is all it takes to be able to figure out what happened. Thanks for the post!

---

<div class="post-metadata">

**Author:** ![007bond007](https://avatars.discourse-cdn.com/v4/letter/0/3be4f8/32.png) [@007bond007](https://openziti.discourse.group/u/007bond007)\
**Post date:** [April 8, 2025, 6:09pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/3 "2025-04-08T18:09:38Z")

</div>

Hi @TheLumberjack ,

Yes that was me, I figured I'd be best to give context here 🙂. For the nextcloud install, it can be a fairly simple installation in a VM or docker (their All In One install), and it looks like they also offer free small accounts via providers: [Sign up for a free Nextcloud account](https://nextcloud.com/sign-up/). I also don't mind testing or providing more details/logs if it can help!

---

<div class="post-metadata">

**Author:** ![ekoby](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ekoby/32/14_2.png) [@ekoby](https://openziti.discourse.group/u/ekoby)\
**Post date:** [April 9, 2025, 5:28pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/4 "2025-04-09T17:28:14Z")

</div>

thanks for the report @007bond007  
I added the [issue](https://github.com/openziti/ziti-tunnel-android/issues/294), it should be fixed in the next release

---

<div class="post-metadata">

**Author:** ![007bond007](https://avatars.discourse-cdn.com/v4/letter/0/3be4f8/32.png) [@007bond007](https://openziti.discourse.group/u/007bond007)\
**Post date:** [April 9, 2025, 8:21pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/5 "2025-04-09T20:21:36Z")

</div>

Amazing, thank-you! I appreciate you looking into this. I'll test when it's released.

---

<div class="post-metadata">

**Author:** ![ekoby](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/ekoby/32/14_2.png) [@ekoby](https://openziti.discourse.group/u/ekoby)\
**Post date:** [April 17, 2025, 2:28pm UTC](https://openziti.discourse.group/t/ziti-network-jwt-enrollment-fails-on-android-when-loaded-from-nextcloud/4310/6 "2025-04-17T14:28:54Z")

</div>

this is fixed in the next release of Ziti Mobile Edge which is available to Beta testers.

Join Beta testing program here: [https://play.google.com/apps/testing/org.openziti.mobile](https://play.google.com/apps/testing/org.openziti.mobile)
