sukhkmr19 / flutter_snapchat Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I have a button in my flutter application that calls the SnapchatFlutterPlugin.snapchatLogin
, but whenever it's called, it redirects to Snapchat like it should and shows the proper info on Snapchat but crashes my app in the background. My app always crashes with
E/AndroidRuntime(19055): FATAL EXCEPTION: OkHttp Dispatcher
E/AndroidRuntime(19055): Process: com.company.app, PID: 19055
E/AndroidRuntime(19055): com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
E/AndroidRuntime(19055): at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
E/AndroidRuntime(19055): at com.google.gson.Gson.fromJson(Gson.java:927)
E/AndroidRuntime(19055): at com.google.gson.Gson.fromJson(Gson.java:865)
E/AndroidRuntime(19055): at com.snapchat.kit.sdk.core.networking.e.intercept(SourceFile:85)
E/AndroidRuntime(19055): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
E/AndroidRuntime(19055): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
E/AndroidRuntime(19055): at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
E/AndroidRuntime(19055): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
E/AndroidRuntime(19055): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
E/AndroidRuntime(19055): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(19055): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(19055): at java.lang.Thread.run(Thread.java:919)
E/AndroidRuntime(19055): Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
E/AndroidRuntime(19055): at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
E/AndroidRuntime(19055): at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
E/AndroidRuntime(19055): ... 11 more
I/Process (19055): Sending signal. PID: 19055 SIG: 9
Everything is setup per the ReadMe.md (With fixes to some typos), Snapchat shows my app information correctly, and when it tries to redirect back to my app, my app crashes again. Any help would be much appreciated.
While run in android device show error in console like
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/com/google/android/gms/play-services-location/'.
> Could not GET 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/com/google/android/gms/play-services-location/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.android.gms:play-services-location.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/com/google/android/gms/play-services-location/'.
> Could not GET 'https://raw.githubusercontent.com/Snap-Kit/release-maven/repo/com/google/android/gms/play-services-location/'. Received status code 400 from server: Bad Request
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 2s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 123.6s (!)
Gradle task assembleDebug failed with exit code 1
And when run in ios error show on device like
All things are done as per Readme section but error show like as per above.
while creating iOS build getting this issue:
`
Xcode's output:
↳
/Users/home/AndroidStudioProjects/filos-app/ios/Runner/AppDelegate.swift:17:12: error: cannot find 'SCSDKLoginClient' in scope
return SCSDKLoginClient.application(app, open: url, options: options)
^~~~~~~~~~~~~~~~
/Users/home/AndroidStudioProjects/filos-app/ios/Runner/AppDelegate.swift:17:12: error: cannot find 'SCSDKLoginClient' in scope
return SCSDKLoginClient.application(app, open: url, options: options)
^~~~~~~~~~~~~~~~
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Runner' from project 'Runner')
Encountered error while building for device.
`
Hi,
I'm getting following error when I try to use the plugin:
/Users/******************/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'snapchat_flutter_plugin/SnapchatFlutterPlugin.h' file not found
#import <snapchat_flutter_plugin/SnapchatFlutterPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
I'm using the latest plugin (0.0.3+1)
Any idea what I did wrong?
More info:
I've setup a demo flutter project with kotlin and swift support and followed your steps.
Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-US)
• Flutter version 1.9.1+hotfix.6 at /Users/***************/flutter
• Framework revision 68587a0916 (9 weeks ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B53
• CocoaPods version 1.7.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.