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

0.3.1 not sending any events #38

Closed
kelvinharron opened this issue Feb 16, 2023 · 4 comments
Closed

0.3.1 not sending any events #38

kelvinharron opened this issue Feb 16, 2023 · 4 comments
Labels
question Further information is requested

Comments

@kelvinharron
Copy link

Expected Behavior

Events from app behaviour should display on amplitude platform.

Current Behavior

No events are showing after upgrading to AmplitudeSwift 0.3.1.

Possible Solution

Downgrade to AmplitudeSwift 0.3.0

Steps to Reproduce

  1. Bumped podfile dependency to 0.3.1.
  2. Built and ran new developer build of the app.
  3. Navigated through app to generate events (which worked previously on 0.3.0).
  4. No events are showing on Amplitude Platform, but they did show when using AmplitudeSwift 0.3.0.

Is is possible this is the cause? I did try specifying the SDK with the following but this didn't resolve it.

// 0.3.0 and 0.3.1
Configuration(apiKey: amplitudeDeveloperApiKey, logLevel: LogLevelEnum.DEBUG, serverZone: ServerZone.EU)

// 0.3.1 with tweak
Configuration(apiKey: amplitudeDeveloperApiKey, logLevel: LogLevelEnum.DEBUG, serverZone: ServerZone.EU, serverUrl: Constants.EU_DEFAULT_API_HOST)

Environment

  • SDK Version: 0.3.1
  • OS Info: iOS 16.2
@kelvinharron kelvinharron added the bug Something isn't working label Feb 16, 2023
@liuyang1520
Copy link
Collaborator

Hi @kelvinharron ,

Thanks for supporting Amplitude!

I just tried the example with following configure, the events are fired and showing up in Amplitude:

configuration: Configuration(apiKey: "xxx", logLevel: LogLevelEnum.DEBUG, serverZone: ServerZone.EU)

I don't think it is related to that change. Could you add the callback to check what is the response?

        configuration: Configuration(
            apiKey: "xxx",
            logLevel: LogLevelEnum.DEBUG,
            callback: { (event: BaseEvent, code: Int, message: String) -> Void in
                print("eventcallback: \(event), code: \(code), message: \(message)")
            },
            serverZone: ServerZone.EU,
        )

Thanks!

@kelvinharron
Copy link
Author

Hey @liuyang1520 thank you for the useful snippet and apologies for the delay in getting back to you.

I worked it out, the callback is not invoked on version 0.3.1 because the serverZone property is set to EU. When I remove this setting I can see the events being fired up! Was this an intended change from the new version?

I believe the admin who created our project created it on https://analytics.amplitude.com not https://analytics.eu.amplitude.com, as our login only works for the former. I figure this means the library is behaving as expected, before closing this out I assume your recommendation is to contact support about discussing a move to the EU server? Thanks again! 😄

@liuyang1520
Copy link
Collaborator

Hi @kelvinharron ,

Good to hear that you figured it out!

The default serverZone value is US, as I notice you mentioned ServerZone.EU in the steps to produce, so I tested it with my EU Amplitude project. This is the expected behavior that after setting EU, it will send to the EU endpoint, and the new version (0.3.1) fixed a bug to make this ServerZone.EU actual work.

If you need to use the EU server, you need to create a project in the EU endpoint as you mentioned above, the API key is not shared across projects. I am not sure about the process of moving to EU, contacting customer support would definitely be helpful on this.

Closing this now, feel free to leave comment if you have more questions, thanks again for supporting Amplitude!

@liuyang1520 liuyang1520 added question Further information is requested and removed bug Something isn't working labels Feb 21, 2023
@kelvinharron
Copy link
Author

Thanks again for the support @liuyang1520 !

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