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

Type Cast Error in v. 1.0.0 #192

Closed
JohannesMilke opened this issue Apr 23, 2021 · 4 comments · Fixed by #193
Closed

Type Cast Error in v. 1.0.0 #192

JohannesMilke opened this issue Apr 23, 2021 · 4 comments · Fixed by #193

Comments

@JohannesMilke
Copy link

I receive the following issue within the Reddit.createScriptInstance method while using version 1.0.0 with NullSafety. Before I was using another version without Null Safety and everything worked fine for me.

Error Message
type '_InternalLinkedHashMap<String, String?>' is not a subtype of type 'Map<String, String>?' in type cast

My implementation

await Reddit.createScriptInstance(
        clientId: clientId,
        clientSecret: secret,
        userAgent: 'ChangeMeClient/0.1 by Name',
        username: username,
        password: password,
      );
@JohannesMilke JohannesMilke changed the title Type Cast Error in 1.0.0 Type Cast Error in v. 1.0.0 Apr 23, 2021
@bkonyi
Copy link
Member

bkonyi commented Apr 23, 2021

Thanks for the report! Can you please provide me a stack trace?

@JohannesMilke
Copy link
Author

JohannesMilke commented Apr 23, 2021

Error Message
type '_InternalLinkedHashMap<String, String?>' is not a subtype of type 'Map<String, String>?' in type cast

Here is the stacktrace:

#0      Authenticator._requestToken (package:draw/src/auth.dart:243:26)
#1      ScriptAuthenticator._authenticationFlow (package:draw/src/auth.dart:345:11)
#2      ScriptAuthenticator.create (package:draw/src/auth.dart:331:25)
#3      new Reddit._scriptInstance (package:draw/src/reddit.dart:491:25)
#4      Reddit.createScriptInstance (package:draw/src/reddit.dart:243:27)
#5      RedditApi.init (package:upload/api/reddit_api.dart:12:28)
#6      main (package:upload/main.dart:38:15)
#7      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

image

@JohannesMilke
Copy link
Author

Any news for this?

bkonyi added a commit that referenced this issue May 13, 2021
- Fixes #192
- Updates package:ini to null safe version
bkonyi added a commit that referenced this issue May 13, 2021
- Fixes #192
- Updates package:ini to null safe version
@bkonyi
Copy link
Member

bkonyi commented May 13, 2021

Sorry for the delay on this one, was caught up with other work. For future reference, I'm always happy to accept PRs :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants