OpenFn / OpenFn/lightning

Investigate Jason.DecodeError

Open
#2,133 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

This is the highest occurring exception on Sentry. What is causing this issue and is it worth solving now?

Sentry Issue: LIGHTNING-AF

Jason.DecodeError: unexpected byte at position 0: 0x42 ("B")
  File "lib/jason.ex", line 92, in Jason.decode!/2
  File "lib/oauth2/response.ex", line 35, in OAuth2.Response.new/4
  File "lib/oauth2/request.ex", line 105, in OAuth2.Request.process_body/4
  File "lib/lightning_web/live/credential_live/oauth_component.ex", line 452, in LightningWeb.CredentialLive.OauthComponent.get_userinfo/4
  File "lib/phoenix_live_view/async.ex", line 85, in Phoenix.LiveView.Async.do_async/5
...
(1 additional frame(s) were not displayed)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/lightning_web/live/credential_live/oauth_component.ex at get_userinfo/4, then trace the reported calls through lib/oauth2/request.ex and lib/oauth2/response.ex. Use the linked Sentry issue to identify the response causing Jason.DecodeError and document its cause, along with whether and how it should be addressed now.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.