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

File opening errors in logger #175

Closed
slava-semeniuk-ek opened this issue Jun 6, 2024 · 6 comments
Closed

File opening errors in logger #175

slava-semeniuk-ek opened this issue Jun 6, 2024 · 6 comments
Labels
question Further information is requested

Comments

@slava-semeniuk-ek
Copy link

I'm currently tracking errors from Amplitude to our error analytics, and I've encountered a significant number of errors in our production app. All the errors are similar in nature, and here are a couple of examples:

  • The file “v2-80” couldn’t be opened because there is no such file.
  • “v2-13” couldn’t be removed.

I'm concerned about whether these errors could potentially cause any data issues?

SDK Version: 1.6.0
OS Info: iOS 17.*

@slava-semeniuk-ek slava-semeniuk-ek added the question Further information is requested label Jun 6, 2024
@crleona
Copy link
Collaborator

crleona commented Jun 6, 2024

Hi @slava-semeniuk-ek - Could you please double check the version of Amplitude-Swift you are using? 1.6.0 was just released two days ago. Any stack traces you can provide would also be very helpful.

@slava-semeniuk-ek slava-semeniuk-ek changed the title Error File opening errors in logger Jun 10, 2024
@slava-semeniuk-ek
Copy link
Author

For the latest version which uses 1.6.0, I could find the following errors:

NSLocalizedDescription: “v2-8” couldn’t be removed.

Logs

AmplitudeErrorLogger.swift - Line 41
specialized AmplitudeMessageLogger.record(issue:message:) + 41

AmplitudeErrorLogger.swift - Line 24
protocol witness for Logger.error(message:) in conformance AmplitudeMessageLogger + 24

PersistentStorage.swift - Line 104
closure #1 in PersistentStorage.remove(eventBlock:) + 104

partial apply for thunk for @callee_guaranteed () -> ()

libdispatch.dylib
_dispatch_sync_f_slow

PersistentStorage.swift - Line 100
PersistentStorage.remove(eventBlock:) + 100

protocol witness for Storage.remove(eventBlock:) in conformance PersistentStorage

IdentifyInterceptor.swift - Line 124
IdentifyInterceptor.getCombinedInterceptedIdentify() + 124

IdentifyInterceptor.swift - Line 157
implicit closure #2 in implicit closure #1 in closure #1 in IdentifyInterceptor.scheduleTransferInterceptedIdentifyEvent() + 157

IdentifyInterceptor.swift - Line 182
closure #1 in IdentifyInterceptor.scheduleTransferInterceptedIdentifyEvent() + 182

QueueTimer.swift - Line 38
closure #1 in QueueTimer.init(interval:once:queue:handler:) + 38

The file “v2-243” couldn’t be opened using text encoding Unicode (UTF-8).

Logs AmplitudeErrorLogger.swift - Line 24

protocol witness for Logger.error(message:) in conformance AmplitudeMessageLogger + 24

PersistentStorage.swift - Line 94
PersistentStorage.getEventsString(eventBlock:) + 94

protocol witness for Storage.getEventsString(eventBlock:) in conformance PersistentStorage

EventPipeline.swift - Line 70
closure #1 in EventPipeline.flush(completion:) + 70

thunk for @callee_guaranteed () -> ()

_dispatch_lane_barrier_sync_invoke_and_complete

EventPipeline.swift - Line 65
EventPipeline.flush(completion:) + 65

EventPipeline.swift - Line 34
closure #1 in EventPipeline.init(amplitude:) + 34

QueueTimer.swift - Line 38
closure #1 in QueueTimer.init(interval:once:queue:handler:) + 38

@crleona
Copy link
Collaborator

crleona commented Jun 12, 2024

Thanks @slava-semeniuk-ek! This was caused by some concurrency issues that were largely resolved in 1.5.0+, but we missed one callback in IdentifyInterceptor, which I've fixed in #176. I've also added some additional diagnostic logging which will help us catch similar issues in the future. Our write patterns are such that events in one of the removed files should have been either uploaded or re-written to another file, so we don't believe this has caused any data issues.

@crleona crleona closed this as completed Jun 12, 2024
@crleona
Copy link
Collaborator

crleona commented Jun 12, 2024

This should be released in 1.6.1

@slava-semeniuk-ek
Copy link
Author

slava-semeniuk-ek commented Jul 9, 2024

@crleona hey, hey, have you had a chance to check the additional diagnostic logging? It looks like these errors are still appearing in Amplitude 1.6.2

@slava-semeniuk-ek
Copy link
Author

@crleona It seems it's still not fixed for 1.7.0. Could you please check the additional diagnostic logging? Let me know If you need any details from my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants