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

Firefox Error while fetching Database list #7364

Closed
deity-bram opened this issue Apr 24, 2019 · 12 comments
Closed

Firefox Error while fetching Database list #7364

deity-bram opened this issue Apr 24, 2019 · 12 comments
Labels
browser:firefox Related to the Firefox browser !deprecated-label:bug Deprecated label - Use #bug instead

Comments

@deity-bram
Copy link

After upgrading from version 0.29.0rc1 to 0.999.0dev.
Firefox doesn't load the welcome screen and gives errors when opening SQL Lab editor or any dashboard
"Error while fetching database list "
"Error while fetching schema list "

SQL lab queries are executed as expected
Single charts do render. but not when included in a dashboard.

Chrome and Safari work correctly

Expected results

After logging in my dashboard renders, and sql lab editor has a database and shema dropdown lists filled. No errors are displayed.

Actual results

Welcome and Dashboard screens keeps loading.

SQL Lab editor dorpdown list aren't filled. auto completion doesn't work

No errors are written to the logs

Screenshots

The welcome screen that keeps loading
image

Initial load of the SQL Lab editor
image

How to reproduce the bug

  1. Log in

  2. Wait until you give up

  3. go to SQL Lab Editor

  4. try to select a database in the dropdown

Environment

(please complete the following information):

  • superset version: master/ 0.999.0dev.
  • python version: Python 3.6.8
  • node.js version: v10.15.3
  • npm version: 6.4.1

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x ] I have reproduced the issue with at least the latest released version of superset.
  • [x ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Watching network trafic in the browser, it doesn't seem like firefox does any of the data requests that I am getting in Chrome.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Apr 24, 2019
@bsnithin44
Copy link

Faced the same issue.

Works fine in Chrome but I get error in Firefox

@jdk514
Copy link

jdk514 commented May 4, 2019

Same issue with Edge and Firefox.

I've identified the following problems:

  • On the dashboard panel in a popup at the bottom:
    • There was an issue fetching the favorite status of this dashboard
    • An error occurred while fetching available CSS template
  • Clicking edit on the dashboard panel in a popup at the bottom (this prevents adding charts to the dashboard):
    • Sorry there was an error fetching saved charts: An error occured
  • When saving a chart in a blue pop-up (this prevents inserting into an existing dashboard):
    • fetching dashboards failed for 1

For all of these errors do appear in the console, but I haven't been able to determine if they are related to the above issues.

@mistercrunch mistercrunch added the browser:firefox Related to the Firefox browser label May 9, 2019
@hamza-iqbal-hi
Copy link

+1

@schoel-bis
Copy link
Contributor

Same here. Console says:

Error initializing SupersetClient DOMException: "The operation is insecure."

with a stack apparently pointing to a call to SupersetClientClass::init(). This is an excerpt from the location in the minified file the stack points to:

a.a.configure({protocol:window.location&&window.location.protocol||"",host:window.location&&window.location.host||"",csrfToken:O}).init().catch(function(e){console.warn("Error initializing SupersetClient",e)})

The request for the CSRF token never gets sent. The site is on http (no TLS), but in chrome requests do actually get sent to http anyway, so I cannot see how it could be mixed content problem. I cannot really spot what's going wrong there; a hand-crafted copy of the request that should be used there executes just fine within the context of the page:

fetch(`http://myserver/superset/csrf_token/`, {
    method: 'GET',
    mode: 'same-origin',
    headers: { 'X-CSRFToken': '0' },
    credentials: 'same-origin',
    cache:'default',
    redirect: 'follow',
    body: undefined,
    signal: undefined,
  })
    .then(res => console.log(res))
    .catch(e => console.error('ERROR',e));

Am I missing anything there?

@schoel-bis
Copy link
Contributor

OK, so the problem is not fetch, but it is HTTP indeed:

callApi in @superset-ui/connection will try to find an existing version of the data in the cache if the window.caches object exists. Unfortunately, as MDN states:

CacheStorage always rejects with a SecurityError on untrusted origins (i.e. those that aren't using HTTPS [...])

At that point, the CacheStorage API throws and the request for the CSRF token as well as the real request are never made.

I believe the correct solution to this problem would probably be to change the constant CACHE_AVAILABLE in superset-ui-connection/src/constants.ts to something like:

export const CACHE_AVAILABLE = 'caches' in self && (self.location && self.location.protocol) === 'https:';

I can make pull request to this respect sometime next week only as I am currently travelling, but anybody may feel free to steal the suggestion for their own pull requests.

@stale
Copy link

stale bot commented Sep 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Sep 6, 2019
@stale stale bot closed this as completed Sep 13, 2019
@squalou
Copy link
Contributor

squalou commented May 5, 2020

I wonder if it's possible to reopen this one,
I'm facing a similar issue, but on Chrome too. (with 0.35.2 or 0.36.0)

@rusackas rusackas reopened this May 6, 2020
@stale stale bot removed the inactive Inactive for >= 30 days label May 6, 2020
@willbarrett
Copy link
Member

Closing this issue - the bug is not browser-specific. @squalou if you're still experiencing this problem, please open a new issue with server-side application logs related to the error.

@amravazzi
Copy link

+1.

I got multiple errors while loading the Superset through an iFrame in my application:

image

@andrewzah
Copy link

andrewzah commented Nov 15, 2021

I get the same errors as @amravazzi when I reverse proxy superset, in firefox. Chromium displays no errors.

@atpage-vpg
Copy link

atpage-vpg commented Nov 16, 2021

Same here. nginx reverse proxy with TLS to superset docker container. Can't add databases in Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:firefox Related to the Firefox browser !deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests