Closed JunjaK closed 4 years ago
I guess it is related to some pro guard rules. @plateaukao Can you look at it when you have time?
May be It concerned with scope of 'openid' ( json web token ) When I run line sign in with no scope, It works well. But when I run line sign in with scope ["profile", "openid", "email"], turns out error like above. However I applied openid in line developer. So I don't know how to solve this problem ..
(This case also release mode, debug mode works well everything.)
Hi, @JunjaK The fix is under review now. https://github.com/line/flutter_line_sdk/pull/11 Hope the pull request can fix the proguard issue in release version.
Thanks for your help. I'll check if new version of line sdk is released on pub.dev.
Version 1.2.3 was released for this issue. Thank you for reporting!
Thanks!! It works well. But there is still something to ask, There is difference between debug mode data and release mode data (result of line social login) In debug mode, the result data of line social login is same as this repository's doc. But in release mode, the result data of line social login is something different. (This issue also applies to previous versions. 1.2.1(I only tested this version)) Example is like this.
{
b:
{
access_token: raw string of access token(private),
expires_in: 2592000000,
id_token:
{
"a": raw string of id token(private),
"b": "https://access.line.me",
"c": some token(private),
"d": audience(private) ,
"e":"Dec 26, 2019 4:18:50 AM",
"f":"Dec 26, 2019 3:18:50 AM",
"h": some token(private),
"i":["lineautologin"],
"j":"윤준현(じゅん jun)",
"k": profile url(private)
"m" : email string(private)
},
}
c: "profile openid"
}
Some '(private)' texts are string that leaks my information. so I can't paste it here. Anyway, in release mode, I can't access result.userprofile, result.acesstoken. I can only access data above in debug mode.
This is just report of the result. It really works well after update 1.2.3 version. I just want report data differences between release mode and debug mode
After I Updated line sdk 1.2.4, I got error. These are errors when I run code 'flutter build appbundle' same as release mode. In debug mode, Everything is okay.
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\AccessToken.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\AccessToken.kt: (9, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\BotFriendshipStatus.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\BotFriendshipStatus.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\Error.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\Error.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\LoginResultForFlutter.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\LoginResultForFlutter.kt: (8, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\UserProfile.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\UserProfile.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\VerifyAccessTokenResult.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\VerifyAccessTokenResult.kt: (6, 2): Unresolved reference: Keep
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_line_sdk:compileReleaseKotlin'.
> Compilation error. See log for more details
* 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 1m 0s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 61.5s
Gradle task assembleRelease failed with exit code 1
use line sdk 1.2.4 In debug mode : android sdk 28 (pixel2, 3) In release mode : andorid 9.0 Galaxy s10e(SM-G970N
@JunjaK do you use AndroidX for your flutter android project?
Currently, line-sdk-android and also flutter_line_sdk still uses android support library instead of AndroidX library.
Could you let me know your flutter development environment?
I tried to migrate the plugin to androidx library.
Could you help to try out this pull request? https://github.com/line/flutter_line_sdk/pull/13
@plateaukao Okay. What exactly should I do to complete pull request #13 ?
I am using AndroidX in my flutter project and the result of flutter doctor is this
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.18363.535], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.41.1)
and my pubspec.ymal is this
name: nuwbies_event
description: A new Flutter project.
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_line_sdk: ^1.2.4
dev_dependencies:
flutter_test:
sdk: flutter
module:
androidX: true
Is there anything else I need to tell you? Because I'm newbie of flutter, so I don't know much of flutter.
Plus, There is something to correct. The same error occurs in debug mode. The error details are as follows.
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\AccessToken.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\AccessToken.kt: (9, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\BotFriendshipStatus.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\BotFriendshipStatus.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\Error.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\Error.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\LoginResultForFlutter.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\LoginResultForFlutter.kt: (8, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\UserProfile.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\UserProfile.kt: (6, 2): Unresolved reference: Keep
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\VerifyAccessTokenResult.kt: (3, 24): Unresolved reference: annotation
e: C:\Flutter\.pub-cache\hosted\pub.dartlang.org\flutter_line_sdk-1.2.4\android\src\main\kotlin\com\linecorp\flutter_line_sdk\model\VerifyAccessTokenResult.kt: (6, 2): Unresolved reference: Keep
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_line_sdk:compileDebugKotlin'.
> Compilation error. See log for more details
* 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 28s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Environment is Window10 emulator - android SDK28 pixel3 / use androidX flutter version : flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.18363.535],
I updated a new pull request to remove the failed fix, and still tried to fix the wrong idToken json data in pull request https://github.com/line/flutter_line_sdk/pull/15.
If possible, please help to fetch pull request https://github.com/line/flutter_line_sdk/pull/15 , and modify your pubspec.yaml
to something similar to following snippet, and try to build your flutter app in release mode again.
...
dependencies:
flutter:
sdk: flutter
#flutter_line_sdk: ^1.2.4
dev_dependencies:
flutter_test:
sdk: flutter
flutter_line_sdk:
path: ../ # <-- change to where you put the flutter_line_sdk project locally
...
It works well both in release mode and in debug mode Thanks. The Line login data in release mode also same as in debug mode.
$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.18363.535], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [√] Android Studio (version 3.5) [√] VS Code (version 1.41.1) [√] Connected device (1 available)
In debug mode : android sdk 28 (pixel3) In release mode : andorid 9.0 Galaxy s10e(SM-G970N
Is it a security issue?
May be no...
What happened actually?
Actually, in flutter debug mode, It works well. but when I install my flutter app in my device with release mode of flutter, Gets error like this.
Authorization menu works well like this.
How can I solve this problem?? (I already tried this issue. https://github.com/line/line-sdk-android/issues/7, may be nothing to do with this issue... )
Your environment?
in release mode Android 9.0 Galaxy s10e(SM-G970N) in debug mode emulator pixel2 and, 3, Andorid sdk version 28, Window10