Skip to content

Unhandled Rejection (SecurityError): The operation is insecure. #3901

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

Closed
1 of 3 tasks
Hardik500 opened this issue Aug 21, 2019 · 12 comments
Closed
1 of 3 tasks

Unhandled Rejection (SecurityError): The operation is insecure. #3901

Hardik500 opened this issue Aug 21, 2019 · 12 comments
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@Hardik500
Copy link

Hardik500 commented Aug 21, 2019

Are you experiencing an issue with...

🪲 Description

I just started running the development using the steps in TUTORIAL.md after running npm start. After that the browser tries to render the webpage but provides an error,
Here is the screen shot file:

Screenshot_1

The logs produced were:
[server] (node:10068) UnhandledPromiseRejectionWarning: Error: Token pool is exhausted [server] at TokenPool._nextBatch (C:\Users\User\Documents\User\git\shields\core\token-pooling\token-pool.js:263:11) [server] at TokenPool.next (C:\Users\User\Documents\User\git\shields\core\token-pooling\token-pool.js:300:20) [server] at GithubApiProvider.tokenForUrl (C:\Users\User\Documents\User\git\shields\services\github\github-api-provider.js:155:33) [server] at GithubApiProvider.request (C:\Users\User\Documents\User\git\shields\services\github\github-api-provider.js:171:22) [server] at Promise (C:\Users\User\Documents\User\git\shields\services\github\github-api-provider.js:210:12) [server] at new Promise (<anonymous>) [server] at GithubApiProvider.requestAsPromise (C:\Users\User\Documents\User\git\shields\services\github\github-api-provider.js:209:12) [server] at GithubForks._requestFetcher (C:\Users\User\Documents\User\git\shields\services\github\github-auth-service.js:13:23) [server] at GithubForks._request (C:\Users\User\Documents\User\git\shields\core\base-service\base.js:223:40) [server] at GithubForks._requestGraphql (C:\Users\User\Documents\User\git\shields\core\base-service\base-graphql.js:72:35) [server] (node:10068) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) [server] (node:10068) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

🔗 Link to the badge

💡 Possible Solution

@Hardik500 Hardik500 added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Aug 21, 2019
@paulmelnikow
Copy link
Member

Hi! Could this be the issue? https://stackoverflow.com/a/49547221/893113 Maybe try it in Chrome?

@Hardik500
Copy link
Author

It seems the problem exists on firefox only since I tried it on brave and it worked perfectly but I noticed two things:

  1. The log is still the same no matter what browser I open
  2. Even if I disabled cookies( which I did on brave ) it still works so the problem is not with the cookies. And I even unblocked all cookies on firefox but it still gives me the same error.

@paulmelnikow
Copy link
Member

Ah, the logs are unrelated to the security error.

@Hardik500
Copy link
Author

Hardik500 commented Aug 22, 2019

But the problem of it not running with firefox still exists.

@paulmelnikow
Copy link
Member

I can't reproduce it in my copy of Firefox (68.0.1). Are you installing dependencies with npm ci?That would ensure you have the same versions as we have.

The stack trace you're seeing isn't from Shields, so this is either an underlying issue in Gatsby, or something in your Firefox setup.

If you run the built site, does the problem go away? Try npm run build and then npm run start:server and then open http://localhost:8080.

@Hardik500
Copy link
Author

I tried the steps which you described, but after running npm run build I got a new error in my console

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'is-css-color'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\User\Documents\User\git\shields\gh-badges\lib\color.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] defs: `node scripts/export-service-definitions-cli.js > service-definitions.yml`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] defs script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.       

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Roaming\npm-cache\_logs\2019-08-24T10_33_42_357Z-debug.log
ERROR: "defs" exited with 1.

@paulmelnikow
Copy link
Member

Ah, yea, that's another issue we're trying to solve at the moment; see #3904.

@Hardik500
Copy link
Author

So is there any workaround or I need to wait for an update.

@paulmelnikow
Copy link
Member

I think npm install in the gh-badges folder?

@Hardik500
Copy link
Author

It works for now but still the same error on firefox still persists.
Anyway should I close the issue for now?

@paulmelnikow
Copy link
Member

Sure, sounds good. I don’t have the capacity to investigate the Firefox issue, especially since there’s a workaround.

@paulmelnikow
Copy link
Member

It looks like the workaround for the is-css-color issue is to npm install -g [email protected]. There's what I think is a regression in 6.11, probably this issue: https://npm.community/t/6-11-1-some-dependencies-are-no-longer-being-installed/9586.

mreishus added a commit to mreishus/spades that referenced this issue Aug 8, 2020
I was getting "Unhandled Rejection (SecurityError): The operation is insecure."
in firefox.

See badges/shields#3901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

2 participants