interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
259 stars 89 forks source link

[BUG] Internal Server Error when redirecting to interaction #2826

Closed raducristianpopa closed 3 months ago

raducristianpopa commented 3 months ago

Bug Report

Describe the bug

After an interactive grant is created and an application tries to redirect the user to the URL, there is an Internal Server Error. This is not happening on a regular basis. After the page is refreshed, the user is correctly redirected to the IdP page.

To Reproduce

This happened to me when connecting my wallet from Rafiki Money to the Web Monetization Extension

Expected behavior

The user should be redirected directly to the IdP page, without having to refresh a page that showcases an Internal Server Error.

Desktop (please complete the following information):

Screenshots image

Additional context

  TypeError: option maxAge is invalid
      at new Cookie (/home/rafiki/node_modules/.pnpm/cookies@0.9.1/node_modules/cookies/index.js:182:11)
      at Cookies.set (/home/rafiki/node_modules/.pnpm/cookies@0.9.1/node_modules/cookies/index.js:117:16)
      at ContextSession.save (/home/rafiki/node_modules/.pnpm/koa-session@6.4.0/node_modules/koa-session/lib/context.js:331:26)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async ContextSession.commit (/home/rafiki/node_modules/.pnpm/koa-session@6.4.0/node_modules/koa-session/lib/context.js:244:5)
      at async session (/home/rafiki/node_modules/.pnpm/koa-session@6.4.0/node_modules/koa-session/index.js:46:9)
      at async cors (/home/rafiki/node_modules/.pnpm/@koa+cors@5.0.0/node_modules/@koa/cors/index.js:109:16)
sabineschaller commented 3 months ago

I was able to reproduce this on the localenv by requesting multiple outgoing payment grants (which require interaction) through Bruno. On the 4th try, I saw the Internal Server Error when opening the redirect link from Bruno.