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

BUG | protocol String.Chars not implemented for %{email: "em@mail.com", email_verified: true, family_name: "OKAY", given_name: "OKAY", locale: "en-GB", name: "OK OK"} of type Map #28

Closed
jasmo2 opened this issue Jan 10, 2020 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed technical

Comments

@jasmo2
Copy link

jasmo2 commented Jan 10, 2020

It still have the error even with the atoms

The way are been call is like this:
ElixirAuthGoogle.get_user_profile(token)

protocol String.Chars not implemented for %{email: "em@mail.com", email_verified: true, family_name: "OKAY", given_name: "OKAY", locale: "en-GB", name: "OK OK"} of type Map

@jasmo2 jasmo2 changed the title protocol String.Chars not implemented for %{email: "em@mail.com", email_verified: true, family_name: "OKAY", given_name: "OKAY", locale: "en-GB", name: "OK OK"} of type Map BUG | protocol String.Chars not implemented for %{email: "em@mail.com", email_verified: true, family_name: "OKAY", given_name: "OKAY", locale: "en-GB", name: "OK OK"} of type Map Jan 10, 2020
@nelsonic nelsonic added bug Something isn't working help wanted Extra attention is needed technical labels Jan 11, 2020
@jasmo2
Copy link
Author

jasmo2 commented Jan 11, 2020

It is weird because when I pass the token directly in consoleiex -s mix
ElixirAuthGoogle.get_user_profile(token)
It returns without any error.

@nelsonic
Copy link
Member

@jasmo2 that is wired ... 🤔

@jasmo2
Copy link
Author

jasmo2 commented Jan 11, 2020

Here I attach a preview of where the error is happening and where succeeding.
The same is happening on the phoenix app.

Example_working_and_Error

@nelsonic
Copy link
Member

@jasmo2 what version of Elixir/Erlang/OTP are you running?

@jasmo2
Copy link
Author

jasmo2 commented Jan 12, 2020

Elixir 1.9.4 (compiled with Erlang/OTP 22)

@nelsonic
Copy link
Member

@jasmo2 Thanks for confirming Elixir version. 👍
Can you try running the demo app https://github.com/dwyl/elixir-auth-google-demo on your localhost (or wherever you are trying to run your code...)

@jasmo2
Copy link
Author

jasmo2 commented Jan 12, 2020

It is working using the DEMO.
the issue is due to I want to use the library as just server side, to get the information. There the error is raise.

Screen Shot 2020-01-12 at 1 21 49 PM

@nelsonic
Copy link
Member

@jasmo2 OK, cool. It's good to have a known (working) state as a starting point. ✅
Can you try to modify the Demo app on your localhost to just invoke the function you want on line 10 of the google_auth_controller.ex
That way we know if the invocation of ElixirAuthGoogle.get_user_profile/1 is doing what you expect it to. 👍
i.e. import the desired functionality into the Demo app and then when it's working, port it back to your "real" app. 💭

@nelsonic
Copy link
Member

@jasmo2 any progress? 😊

@nelsonic
Copy link
Member

@jasmo2 were you able to get it working? 💭

@nelsonic
Copy link
Member

nelsonic commented Jun 6, 2021

Closing as no follow up feedback from OP and we cannot replicate the issue.
If still an issue, please re-open and give more info. Thanks.

@nelsonic nelsonic closed this as completed Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed technical
Projects
None yet
Development

No branches or pull requests

2 participants