Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS 15.3] Application immediatly close on sync with s3 target #6089

Closed
vfricou opened this issue Feb 3, 2022 · 22 comments
Closed

[iOS 15.3] Application immediatly close on sync with s3 target #6089

vfricou opened this issue Feb 3, 2022 · 22 comments
Labels
bug It's a bug stale An issue that hasn't been active for a while...

Comments

@vfricou
Copy link

vfricou commented Feb 3, 2022

The sync process to S3 bucket cause an application close on iOS.

When S3 synchronization is configured, at sync process start, the application immediatly close. Even at application restart.
The issue stay in place after an application full uninstall/reinstall.

Tested with S3 target on AWS, Scaleway or Minio (through reverse proxy or not)

Environment

Joplin version: 12.6.2
Platform: iOS
OS specifics: iPhone 12 - iOS 15.3 (problem started on 15.2)

Steps to reproduce

  1. Install Joplin from store
  2. Configure synchronization on S3 with existing bucket target
  3. Start synchronization

Describe what you expected to happen

It’s expected to synchronization ran normally without application close

Logfile

No relevant log available on iPhone, and no relevant log with minio target (no minio server relevant log)

@vfricou vfricou added the bug It's a bug label Feb 3, 2022
@vfricou
Copy link
Author

vfricou commented Feb 3, 2022

I’ve found error exception with iPhone connected to my Mac :

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1db534558'
*** First throw call stack:
(0x1805390fc 0x198d73d64 0x1806160c4 0x1804ce524 0x1804cd660 0x104581c60 0x1804c23a4 0x1804dfb74 0x1805169d4 0x10451c264 0x10451e868 0x10451e498 0x1801a9924 0x1801ab670 0x1801b2df4 0x1801b3968 0x1801be1b8 0x1f180b0f4 0x1f180ae94)

@leematos
Copy link
Contributor

leematos commented Feb 3, 2022

Hi!

I'm on 15.2.1 now with the latest joplin app (12.6.2) and not getting this error. I also wrote the updated S3 code in Joplin.

  • On your Joplin iOS app -> Configuration what version of the DB are you on (I'm on 41)
  • Are you inputting a region in the joplin S3 settings?
  • Is Force path style on or off?
  • Are you able to run a check synchronization configuration or does that trigger the crash?

@ocian
Copy link

ocian commented Feb 6, 2022

Hello!

I'm on iOS 15.3 now with the same lastest joplin app(12.6.2) and have the same error. My S3 backend is build with minio.

By the way, on my MacOS 12.0.1 with joplin 2.5.12 and my Android 11 with joplin 2.3.4, this sync method is all OK.

machine machine version joplin version status
iOS 15.3 12.6.2 closed when sync
MacOS 12.0.1 2.5.12 fine
Android 11 2.3.4 fine

@vfricou
Copy link
Author

vfricou commented Feb 6, 2022

Hi,
Replies below.

  • On your Joplin iOS app -> Configuration what version of the DB are you on (I'm on 41)

I'm on 41 too

  • Are you inputting a region in the joplin S3 settings?

Yes region is defined

  • Is Force path style on or off?

Force path style is on

  • Are you able to run a check synchronization configuration or does that trigger the crash?

Yes I've done sync test with ok result and this no close app crash.

@leematos
Copy link
Contributor

leematos commented Feb 6, 2022

Thanks, I'll see if I can repro in a test env.

Can you add [iOS] -> [iOS 15.3] to the title for clarity?

@vfricou vfricou changed the title [iOS] Application immediatly close on sync with s3 target [iOS 15.3] Application immediatly close on sync with s3 target Feb 6, 2022
@leematos
Copy link
Contributor

leematos commented Feb 7, 2022

I attempted to test this tonight but I need a full OS update to get to the 15.3 simulator... I won't be able to get to that until at least next weekend. :(

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2022

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Mar 9, 2022
@github-actions
Copy link
Contributor

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

@mariusv
Copy link

mariusv commented Apr 15, 2022

I have the same issue with latest Joplin version on iOS.
Is there a workaround?
Thanks a bunch for an awesome app

@lbalogh
Copy link

lbalogh commented Jul 31, 2022

I was trying to migrate from Joplin server (self hosted) to S3 (also self hosted), but got the same result :

  • When configuring S3 sync settings in the iOS app, the sync test says that everything is OK and successful. The app doesn't crash
  • But as soon as Joplin tries to do the first sync, it crashes. Then, when starting Joplin again it crashes after 2-3 seconds. The only way to "recover" is to remove and reinstall the app so all settings are reseted.

My config :

  • iPhone 13 Pro on iOS 16 beta 4
  • Joplin 12.8.1
  • The S3 bucket is configured on a self hosted MinIO docker instance

It doesn't seem to be linked to the iOS version as OP reported this on iOS 15.3.

Also, the desktop app on my Mac sync correctly to this same S3 bucket.

Some more info :

  • Yes region is defined
  • Force path style is on
  • DB version displayed in Joplin settings is v41

For now I just reverted to using my sefl hosted Joplin server. I was doing this for educational purpose.

Let me know how I can help.

@leematos
Copy link
Contributor

I think this is a problem with something we send and what MinIO expects/returns

Can you get logs from the minIO side and see if we can see the requests it received?

Is your minio server by chance internet accessible that you could get me a test user set up?

I suspect it's the same as #6047

@lbalogh
Copy link

lbalogh commented Jul 31, 2022

Well I checked the trace logs of MinIO but I don't see any errors. I haven't found YET how to export these logs in text format, so are are some screenshot of what happens when I launch the app on my iPhone :

Logs_2

Logs_2

Maybe there's a way to have more advanced logs... I'll have to investigate.

My MinIO server is not exposed to the outside, but I can send you a temporary access so you can check by yourself. The connection goes to a reverse proxy though, but the result is the same : even when I try locally by configuring the S3 URL directly using a local ip (192.168.1.xxx) Joplin also crash, so I don't think it's linked to the reverse proxy

@lbalogh
Copy link

lbalogh commented Jul 31, 2022

Let me know how I can send you the S3 bucket configuration so you can try by yourself ;)

@leematos
Copy link
Contributor

leematos commented Aug 1, 2022

@lbalogh find dot creativity at github username dot com -- i don't expect to have a chance to look at this until this weekend as I don't have a recent dev env set up.

@lbalogh
Copy link

lbalogh commented Aug 1, 2022

No problem. I sent you the information for the test S3 bucket so you can reproduce the crash. Note that as you won't be able to test it before the week-end, I'll only enable access from outside at the end of the week. Tell me if you need it before

@chaosye0
Copy link

the latest joplin app on ios still crashed when sync with s3 (minio)

@leematos
Copy link
Contributor

@chaosye0 -- Any more insight? Logs? anything?

@chaosye0
Copy link

chaosye0 commented Jan 18, 2024

@chaosye0 -- Any more insight? Logs? anything?

app closes immediately when s3 sync started, and left one .locks folder in my joplin bucket. After I deleted the .locks folder, the windows joplin app then sync without error.
The ios joplin app starts syncing then closes, when I open it, and left a folder named as ".locks". It can be reproduced in my ios 17.2.1.

@itention
Copy link

itention commented Feb 2, 2024

Hi there! I've got same problem with my s3 minio instance. Here is a console logs from my iPhone12
Console iPhone (Mikhail).txt

@leematos
Copy link
Contributor

leematos commented Feb 4, 2024

Hi there! I've got same problem with my s3 minio instance. Here is a console logs from my iPhone12 Console iPhone (Mikhail).txt

Thanks! Any chance you have corresponding s3 minio logs as well for that time period?

specifically say 5 minutes before and after this:

Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> {strength 1, tls 8, sub 0, sig 0, ciphers 1, bundle 0, builtin 0}
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> now using Connection 2
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> sent request, body N 0
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> received response, status 200 content K
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> done using Connection 2
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> response ended
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> summary for task success {transaction_duration_ms=7, response_status=200, connection=2, reused=1, reused_after_ms=0, request_start_ms=1, request_duration_ms=0, response_start_ms=6, response_duration_ms=0, request_bytes=281, response_bytes=808, cache_hit=true}
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <374D9756-4A24-4C76-ACC7-9E0269443B57>.<9> finished successfully
Feb  2 10:07:22 iPhone-Mikhail kernel()[0] <Notice>: wlan0:com.apple.p2p: isInfraRealtimePacketThresholdAllowed allowed:1 option:32 threshold:50 noRegistrations:1 cachedPeerCount:0 fastDiscoveryInactive:1 fastDiscoveryOnSince:39164780
Feb  2 10:07:22 iPhone-Mikhail kernel()[0] <Notice>: wlan0:com.apple.p2p: currentInfraTrafficType:8537 checking if realtime upgrade required with inputPackets:170 outputPackets:403 packetThreshold:50
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <8B211BCD-D3F6-4246-84F4-4A303312967A>.<7> received response, status 204 content U
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <8B211BCD-D3F6-4246-84F4-4A303312967A>.<7> done using Connection 2
Feb  2 10:07:22 iPhone-Mikhail Joplin(Network)[2718] <Notice>: [C2] event: client:connection_idle @0.390s
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <8B211BCD-D3F6-4246-84F4-4A303312967A>.<7> response ended
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <8B211BCD-D3F6-4246-84F4-4A303312967A>.<7> summary for task success {transaction_duration_ms=172, response_status=204, connection=2, reused=1, reused_after_ms=17, request_start_ms=0, request_duration_ms=0, response_start_ms=172, response_duration_ms=0, request_bytes=291, response_bytes=327, cache_hit=false}
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <8B211BCD-D3F6-4246-84F4-4A303312967A>.<7> finished successfully
Feb  2 10:07:22 iPhone-Mikhail kernel(AppleH11ANEInterface)[0] <Notice>: ANE0: processTargetToHostIOCommand: DEBUG: Got program notification but no matching program found- programId: 0 processId: 0 uuid: <private> procedureid: 0 programEvent: 3
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <6DD7FE51-AA29-4B22-9B8B-B6F9179BA029>.<10> resuming, timeouts(0.0, 604800.0) QOS(0x19) Voucher (null)
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: [Telemetry]: Activity <nw_activity 12:2[5A829E92-139A-4B53-8906-BA4EA06091F3] (reporting strategy default)> on Task <6DD7FE51-AA29-4B22-9B8B-B6F9179BA029>.<10> was not selected for reporting
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <6DD7FE51-AA29-4B22-9B8B-B6F9179BA029>.<10> {strength 1, tls 8, sub 0, sig 0, ciphers 1, bundle 0, builtin 0}
Feb  2 10:07:22 iPhone-Mikhail Joplin(Network)[2718] <Notice>: [C2] event: client:connection_reused @0.401s
Feb  2 10:07:22 iPhone-Mikhail Joplin(CFNetwork)[2718] <Notice>: Task <6DD7FE51-AA29-4B22-9B8B-B6F9179BA029>.<10> now using Connection 2
Feb  2 10:07:22 iPhone-Mikhail Joplin(CoreFoundation)[2718] <Notice>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1e2210970'
0x1e2210970'
*** First throw call stack:
(0x18ba7a69c 0x183d2fc80 0x18bb0afdc 0x18b9bfe08 0x18bb00950 0x10086a7a4 0x19397f6a8 0x193981300 0x193988894 0x1939893c4 0x193994004 0x193993878 0x1f5973964 0x1f5973a04)
Feb  2 10:07:22 iPhone-Mikhail SpringBoard(libxpc.dylib)[33] <Notice>: [0x8c2b53bd0] invalidated after getting a no-senders notification - client is gone
Feb  2 10:07:22 iPhone-Mikhail SpringBoard(libxpc.dylib)[33] <Notice>: [0x8c4285810] invalidated after getting a no-senders notification - client is gone
Feb  2 10:07:22 iPhone-Mikhail SpringBoard(FrontBoard)[33] <Notice>: [app<net.cozic.joplin(0D590A68-FDB5-483E-B75B-EE656A0BDC8B)>:2718] Workspace connection invalidated.
Feb  2 10:07:22 iPhone-Mikhail SpringBoard(FrontBoard)[33] <Notice>: [app<net.cozic.joplin(0D590A68-FDB5-483E-B75B-EE656A0BDC8B)>:2718] Now flagged as pending exit for reason: workspace client connection invalidated
Feb  2 10:07:22 iPhone-Mikhail SpringBoard(RunningBoardServices)[33] <Notice>: Updating configuration of monitor M33-11
Feb  2 10:07:22 iPhone-Mikhail mDNSResponder(libxpc.dylib)[156] <Notice>: [0xc9e90a940] invalidated after getting a no-senders notification - client is gone
Feb  2 10:07:22 iPhone-Mikhail backboardd(IOKit)[67] <Notice>: Connection removed: IOHIDEventSystemConnection uuid:45B968EC-15F2-4A33-862E-5977D0DB37A8 pid:2718 process:Joplin type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 280 attributes:{

Basically in the logs before this I see an SSL connection being attempted, it appears to abort (posibly normal, maybe wrong ciphers) I see another SSL attemption connected, similar messages, and then I see a string of 200 requests, and then this 204 with an exception saying "client is gone". I think Minio logs would help to see what minio was doing with the connection and why.

Beyond that, if you have a test bucket you can set up in minio without https I might suggest trying to sync that and see if the behavior is the same or different. I'm not sure if this is a "malformed request" that minio doesn't like or "SSL issues" that minio doesn't like.

@n3b0r
Copy link

n3b0r commented May 8, 2024

This is also happening to me when using third-party S3 providers like iDrive.

Does there exist any temp workaround to run Joplin on iOS while this is addressed?

Thanks

@itention
Copy link

itention commented May 12, 2024

Hi there! Sorry for delay. This log from minio(mc admin trace myminio -a -v). It all starts with launching the Joplin application on my iPhone.
miniolog.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug stale An issue that hasn't been active for a while...
Projects
None yet
Development

No branches or pull requests

8 participants