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

Error when uploading event: Value missing_event #208

Open
andriusscale opened this issue Nov 11, 2024 · 1 comment
Open

Error when uploading event: Value missing_event #208

andriusscale opened this issue Nov 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@andriusscale
Copy link

Expected Behavior

Event should have been sent and show up in the events list.

Current Behavior

Amplitude SDK throws this error:

E/Amplitude(12281): Stack trace: org.json.JSONException: Value missing_event of type java.lang.String cannot be converted to JSONObject
E/Amplitude(12281): 	at org.json.JSON.typeMismatch(JSON.java:112)
E/Amplitude(12281): 	at org.json.JSONObject.<init>(JSONObject.java:172)
E/Amplitude(12281): 	at org.json.JSONObject.<init>(JSONObject.java:185)
E/Amplitude(12281): 	at com.amplitude.core.utilities.HttpResponse.createHttpResponse(Response.kt:14)
E/Amplitude(12281): 	at com.amplitude.core.utilities.HttpClient$upload$1.close(HttpClient.kt:40)
E/Amplitude(12281): 	at com.amplitude.core.platform.EventPipeline$upload$1.invokeSuspend(EventPipeline.kt:142)
E/Amplitude(12281): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/Amplitude(12281): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
E/Amplitude(12281): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/Amplitude(12281): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/Amplitude(12281): 	at java.lang.Thread.run(Thread.java:1012)

No events appear in the amplitude website

Steps to Reproduce

  1. Setup Amplitude
final amplitude = Amplitude(
    Configuration(
      apiKey: const String.fromEnvironment('AMPLITUDE_API_KEY'),
      serverUrl: 'https://api.eu.amplitude.com',
      serverZone: ServerZone.eu,
      defaultTracking: DefaultTrackingOptions.all(),
      logLevel: LogLevel.debug,
    ),
  );
  1. Send a new event on Android
    amplitude.track(BaseEvent('event'));

Environment

amplitude_flutter:
version: "4.0.0-beta.5"
com.amplitude:analytics-android:1.19.1

[✓] Flutter (Channel stable, 3.24.4, on macOS 15.1)
• Flutter version 3.24.4 on channel stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 603104015d (3 weeks ago), 2024-10-24 08:01:25 -0700
• Engine revision db49896cf2
• Dart version 3.5.4
• DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16B40
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.95.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.100.0

[✓] Connected device (6 available)
• A142 (mobile) • android-arm64 • Android 14 (API 34)

[✓] Network resources
• All expected network resources are available.

@andriusscale andriusscale added the bug Something isn't working label Nov 11, 2024
@andriusscale
Copy link
Author

Same issue with iOS, logs are getting spammed with this:

Error: Response failed with code400: missing_event
Error: Response failed with code400: missing_event
Error: Response failed with code400: missing_event
Error: Response failed with code400: missing_event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant