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

Not Understanable Error #5788

Closed
ac2epsilon opened this issue Jan 17, 2021 · 4 comments · Fixed by #5795
Closed

Not Understanable Error #5788

ac2epsilon opened this issue Jan 17, 2021 · 4 comments · Fixed by #5795
Assignees
Labels

Comments

@ac2epsilon
Copy link

ac2epsilon commented Jan 17, 2021

What you were expecting:

I expected ra-data-graphql example will work.
https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphql-simple#usage
And after I copy-pasted code into App.js... (compiling was fine)

What happened instead:

... in run time I got following with 2 sec delay after page appearence

Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead.

Steps to reproduce:

Copy And Paste App.js from docs, change endpoint to http://ac2spotters.gq/apollo (playground opened, so welcome to play) and what? Even IF it is my own fail like "Not properly configured schema", I'd like to know this, not The dataProvider threw an error.

Other information:

Environment

  • React-admin version: "react-admin": "^3.11.2", "ra-data-graphql-simple": "^3.10.2", "graphql": "^15.4.0"
  • Last version that did not exhibit the issue (if applicable): n/a
  • React version: "react": "^17.0.1"
  • Browser: Версія 86.0.4240.193 (Розробка) (64-розрядна версія)
  • Stack trace (in case of a JS error):
    Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead.
    ▼ 22 stack frames were expanded.
    performQuery
    node_modules/ra-core/esm/dataProvider/useDataProvider.js:512
    doQuery
    node_modules/ra-core/esm/dataProvider/useDataProvider.js:275
    Proxy.
    node_modules/ra-core/esm/dataProvider/useDataProvider.js:239
    (anonymous function)
    node_modules/ra-core/esm/dataProvider/useQueryWithStore.js:180
    (anonymous function)
    node_modules/ra-core/esm/dataProvider/useQueryWithStore.js:179
    invokePassiveEffectCreate
    node_modules/react-dom/cjs/react-dom.development.js:23487
    HTMLUnknownElement.callCallback
    node_modules/react-dom/cjs/react-dom.development.js:3945
    invokeGuardedCallbackDev
    node_modules/react-dom/cjs/react-dom.development.js:3994
    invokeGuardedCallback
    node_modules/react-dom/cjs/react-dom.development.js:4056
@fzaninotto
Copy link
Member

Which code snippet did you paste?

@ac2epsilon
Copy link
Author

Знімок екрану_2021-01-17_16-12-28

@fzaninotto fzaninotto self-assigned this Jan 18, 2021
@fzaninotto
Copy link
Member

I could reproduce the error "The dataProvider threw an error. It should return a rejected Promise instead.". Fix incoming.

@fzaninotto
Copy link
Member

Let's keep this issue for the initial description.

The providers are indeed outdated. Please look for existing issues about them before opening a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants