Comments (4)
Thanks @mt00chikin - I believe this is fixed by #159 which should release later this week.
from amplitude-swift.
Hi @mt00chikin, The stack trace points to a crash calling dispatch.sync
on one of our internal queues, which probably indicates a deadlock. Could you share more information about how you are calling ApplicationAnalyticsService.identifyIfNeeded (in terms of dispatch), as shown in the background thread in the stack trace?
from amplitude-swift.
Sure thing. That service manages multiple different analytics destinations, Amplitude being one of several, and on any analytics event publish(_:)
call it first checks several user properties to ensure that the user's context hasn't changed since the last event was fired. If it has, it then calls identify
on each downstream service. In our case, it calls Amplitude's public func identify(identify: Identify, options: EventOptions? = nil) -> Amplitude
function. Once that's done, it proceeds to publish the event using amplitude.track()
.
This is all happening on an internal serial DispatchQueue.
// ApplicationAnalyticsService.swift
func publish(_ event: SubwayEvent) {
eventQueue.async { [weak self] in
guard let self else { return }
...
publish(event)
}
}
private func publish(_ event: AnalyticEvent) {
identifyIfNeeded()
// Publish on each downstream service
services.forEach { $0.publish(event) }
}
private func identifyIfNeeded() {
guard let userIdentity = contextCache?.currentUserIdentity() else { return }
// If identity did not change there's no need to re-identify the user.
guard userIdentity != currentUserIdentity else { return }
services.forEach { $0.identify(userIdentity) }
currentUserIdentity = userIdentity
}
from amplitude-swift.
This should be fixed in 1.5.0.
from amplitude-swift.
Related Issues (20)
- `ampli status` does not understand cross package calls HOT 2
- Amplitude SDK not tracking events on watchOS HOT 6
- Events are not connected after setting user id HOT 1
- `ampli status` does not recognise functions as parameters HOT 2
- File opening errors in logger HOT 6
- Crash of the 1.6.0 on WatchOS 8 HOT 4
- Analytics Connector a separate repo/library HOT 1
- Amplitude don't work with AppClip HOT 1
- Not receiving events HOT 2
- watchOS 8 crash HOT 2
- Amplitude won't initialize HOT 2
- Properties with a value of "[Non-Encodable]"
- Events not showing up when migrating to latest Amplitude-Swift 1.7.0 HOT 6
- Add Support for Swift Concurrency HOT 2
- Provision for authorization headers in Amplitude SDK to route calls to third party url HOT 1
- Analytics issues with new SDK HOT 1
- Possible duplication of sqlite3 library causes multiple error HOT 4
- Migrating from Amplitude-iOS to Amplitude-Swift gives error in generated Ampli code HOT 2
- Crash after initialize with pending events: @nonobjc NSData.init(contentsOf:options:) HOT 8
- How do I debug 400 errors? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplitude-swift.