deep-foundation / deeplinks

https://discord.gg/deep-foundation
The Unlicense
14 stars 9 forks source link

Error: token for apolloClient is invalid or not provided #300

Open FreePhoenix888 opened 9 months ago

FreePhoenix888 commented 9 months ago

Bug description

I get Error: token for apolloClient is invalid or not provided error when trying to login

Expected Behavior

Login as in https://github.com/deep-foundation/deeplinks/blob/427e40603a99bc658f69d52ed9efef340362aa86/tests/permissions.ts#L1132-L1171 test the is passing successfully

Current Behavior

I get Error: token for apolloClient is invalid or not provided error when trying to login

Steps to reproduce

Execute this code: https://github.com/deep-foundation/payments-tinkoff-c2c/blob/fc7fc546ea3735898c58198d8176d2d8887cb63d/payments-tinkoff-c2c.cjs#L83-L123 . Do not forget to change generateApolloClient arguments

Workaround

No response

Environment

## System:
 - OS: Linux 6.1 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
 - CPU: (16) x64 AMD EPYC 7B13
 - Memory: 50.56 GB / 62.79 GB
 - Container: Yes
 - Shell: 5.1.16 - /bin/bash
## npmPackages:
 - @deep-foundation/deeplinks: ^0.0.330 => 0.0.330 
 - axios: ^1.6.7 => 1.6.7 
 - chai: ^5.0.3 => 5.0.3 
 - dotenv: ^16.4.1 => 16.4.1 
 - dotenv-expand: ^10.0.0 => 10.0.0 
 - lodash: ^4.17.21 => 4.17.21 
 - prompt-sync: ^4.2.0 => 4.2.0 
 - puppeteer: ^21.10.0 => 21.10.0 
 - uniqid: ^5.4.0 => 5.4.0
Konard commented 9 months ago

It is possible to find this error in code like this: https://github.com/search?q=repo%3Adeep-foundation%2Fdeeplinks+%22token+for+apolloClient+is+invalid+or+not+provided%22&type=code

Then you can go https://github.com/deep-foundation/deeplinks/blob/427e40603a99bc658f69d52ed9efef340362aa86/imports/client.tsx#L558 and read the code.

That error means that you should provide the token, or there is an error in logic.

Did you try to uncomment the token here: https://github.com/deep-foundation/payments-tinkoff-c2c/blob/fc7fc546ea3735898c58198d8176d2d8887cb63d/payments-tinkoff-c2c.cjs#L89 ? You may also try to replace this token with your working token.