question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Canvas locally-hosted internal server error when sending request to authorize_redirect endpoint

See original GitHub issue

Hello,

Describe the bug When attempting to access the Canvas authorize_redirect endpoint, it throws an internal server error (error code 500). When I check the Canvas error log it says “undefined method `sign’ for nil:NilClass”. Any help would be greatly appreciated.

Registration Code await lti.registerPlatform({ url: ‘https://canvas.instructure.com’, name: ‘Canvas Instructure’, clientId: ‘10000000000005’, authenticationEndpoint: ‘http://192.168.1.43/api/lti/authorize_redirect’, accesstokenEndpoint: ‘http://192.168.1.43/login/oauth2/token’, authConfig: { method: ‘JWK_SET’, key: ‘http://192.168.1.43/api/lti/security/jwks’ } })

Debug console logs provider:main Platform already registered +47ms provider:main Receiving request at path: /login +9s provider:main Receiving a login request from: https://canvas.instructure.com, clientId: 10000000000005 +1ms provider:main Redirecting to platform authentication endpoint +6ms provider:main Target Link URI: http://localhost:3000 +0ms provider:main Login request: +2ms provider:main { provider:main response_type: ‘id_token’, provider:main response_mode: ‘form_post’, provider:main id_token_signed_response_alg: ‘RS256’, provider:main scope: ‘openid’, provider:main client_id: ‘10000000000005’, provider:main redirect_uri: ‘http://localhost:3000’, provider:main login_hint: ‘33f5627d790a427db3d213600ad0bddc85411a1a’, provider:main nonce: ‘lcouezf8unuh6tib8rbd43gbz’, provider:main prompt: ‘none’, provider:main state: ‘008171e660418d3f2b72eec60cb455f854e16378d2321f2b9e’, provider:main lti_message_hint: ‘eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJpZmllciI6IjMxZDhkOGE4ZDQ3ODcwOWFlMDNhMDk2ODQzZjU2ZTI4MTk1MjJlMmYzYjg3YWQzYjNjYWIyMWM0ZjEwZTM2NjMwYzYzMjE0YTMxN2QwZDFiYjVhMjZiZDJiZjE5NDJjOWZlOWY2Y2MwM2E0YjVhNzBhNzU1OTUwYTc4ZGM0ZTA3IiwiY2FudmFzX2RvbWFpbiI6IjE5Mi4xNjguMS40MyIsImNvbnRleHRfdHlwZSI6IkFjY291bnQiLCJjb250ZXh0X2lkIjoxMDAwMDAwMDAwMDAwMiwiY2FudmFzX2xvY2FsZSI6ImVuIiwiZXhwIjoxNjYyMjM0NDAwfQ._gxbB92MEb_nt5anHjdy39C3PSg4QS3fG4smjiVMO3M’ provider:main }

Ltijs version

  • Version: 5.9.0

NodeJS version

  • Version: 16.13.1

Platform used

  • Canvas (locally-hosted) (packaged by Bitnami)
  • Version: 2022.7.20-142.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pepeL95commented, Sep 5, 2022

Yea, just type in the browser http://your-canvas-host/error_reports/your-error-id

For example, in my case I typed http://192.168.1.43/error_reports/1 @dmolin

0reactions
dmolincommented, Sep 15, 2022

@dmolin May I ask how did you fix the ntp configurations?

Here are the step I followed (I’m pulling that from memory but that should be roughly correct):

Fixing Bitnami’s VM

  • update your system: sudo apt-get update -y
  • Install DBUS: sudo apt-get install dbus
  • ensure you’ve the timedatectl command installed (you should be able to run it with sudo)
  • reboot
  • install systemd-timesyncd: sudo apt-get install systemd-timesyncd
  • enable systemd-timesyncd service: sudo systemctl enable systemd-timesyncd.service (maybe reboot after that too)
  • now you should be able to see some results with timedatectl: sudo timedatectl list-timezones
  • set your timezone: an example: sudo timedatectl set-timezone Europe/London
  • enable the NTP network time service: sudo timedatectl set-ntp on
  • shutdown again
Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: 500 Internal Server Error when POSTing to submissi...
Solved: Hello all, I'm trying to use the Canvas API to upload files for a student submission, but I keep getting a 500...
Read more >
Internal Server error at redirect-uri step of LTI 1.3 integration
Successful launch to OIDC Connect Initiation URL which I can tell by logging results on my server. If any of the parameters were...
Read more >
How to Clear Browser Cookies to Resolve “Error 500
If you are receiving an “Error 500 – Internal Server Error” message while trying to log into Canvas, you will need to clear...
Read more >
500 (Internal Server Error) when sending AJAX post to ASP
When replacing the dataUrl with a simple string 'xxxxx', no error. This is the AJAX code: function takepic() { var canvas = document....
Read more >
OAuth, internal server error - monday Apps & Developers
I did all the steps in the doc, but somehow, whenever my application calls the redirect towards the /authorize endpoint, after I authorize ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found