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

oAuth 2 Mate Not Working in Insomnia 8.6.0 #7019

Closed
1 task done
smiller0924 opened this issue Jan 23, 2024 · 5 comments
Closed
1 task done

oAuth 2 Mate Not Working in Insomnia 8.6.0 #7019

smiller0924 opened this issue Jan 23, 2024 · 5 comments
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@smiller0924
Copy link

Expected Behavior

My oAuth 2 Mate is throwing an error where I try to access the plugin. The Plugins are not working correctly

Actual Behavior

When I click the Plugins I get the following error: Failed to load plugin insomnia-plugin-oa2-mate

Here is what is showing in the Stack Trace:
Error: Cannot find module 'nedb'
Require stack:

  • C:\Users\sm623\AppData\Local\insomnia\app-8.6.0\resources\app.asar\index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:1084:15)
    at o._resolveFilename (node:electron/js2c/renderer_init:2:3225)
    at Module._load (node:internal/modules/cjs/loader:929:27)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at o._load (node:electron/js2c/renderer_init:2:2455)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (C:\Users\sm623\AppData\Roaming\Insomnia\plugins\insomnia-plugin-oa2-mate\index.js:79:19)
    at Object. (C:\Users\sm623\AppData\Roaming\Insomnia\plugins\insomnia-plugin-oa2-mate\index.js:181:3)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at o._load (node:electron/js2c/renderer_init:2:2455)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at uG (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:81:7484)
    at Sk (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:81:8221)
    at async u (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:1560:17437)

Reproduction Steps

  1. Click Application
  2. Click Preferences
  3. Click Plugins
  4. Get error, "Failed to load plugin insomnia-plugin-oa2-mate"

image

  1. Click Stack Trace
    `Error: Cannot find module 'nedb'
    Require stack:
  • C:\Users\sm623\AppData\Local\insomnia\app-8.6.0\resources\app.asar\index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:1084:15)
    at o._resolveFilename (node:electron/js2c/renderer_init:2:3225)
    at Module._load (node:internal/modules/cjs/loader:929:27)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at o._load (node:electron/js2c/renderer_init:2:2455)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (C:\Users\sm623\AppData\Roaming\Insomnia\plugins\insomnia-plugin-oa2-mate\index.js:79:19)
    at Object. (C:\Users\sm623\AppData\Roaming\Insomnia\plugins\insomnia-plugin-oa2-mate\index.js:181:3)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at o._load (node:electron/js2c/renderer_init:2:2455)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at uG (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:81:7484)
    at Sk (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:81:8221)
    at async u (file:///C:/Users/sm623/AppData/Local/insomnia/app-8.6.0/resources/app.asar/index-0fe701a5.js:1560:17437)`

Is there an existing issue for this?

Additional Information

The only way to clear it is to remove the oAuth 2 Mate. As a result I have to change my Insomnia in the method it captures the oAuth Token. How do we make this work?

Insomnia Version

8.6.0

What operating system are you using?

Windows

Operating System Version

Windows 10

Installation method

Automatic upgrade

Last Known Working Insomnia version

8.5.0

@smiller0924 smiller0924 added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Jan 23, 2024
@jackkav
Copy link
Contributor

jackkav commented Jan 24, 2024

Insomnia is now using a fork of nedb, https://www.npmjs.com/package/@seald-io/nedb so updating the insomnia-plugin-oa2-mate to point at @seald-io/nedb should correct this.

@jackkav jackkav closed this as completed Jan 24, 2024
@smiller0924
Copy link
Author

Where exactly do I change where the "insomnia-plugin-oa2-mate" points to "@seald-io/nedb"?

@smiller0924
Copy link
Author

Never mind. I figured it out. I went into index.js. Then changed: "var NeDb = window.require("nedb"); " to "var NeDb = window.require("@seald-io/nedb");"

@briantully
Copy link

briantully commented Sep 11, 2024

Does this mean everyone needs to find and update index.js to point to the correct nedb? I'm getting this error with the latest version (10.0) of Insomnia on macOS:

Error: Cannot find module 'nedb'
Require stack:
- /Applications/Insomnia.app/Contents/Resources/app.asar/index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:1152:15)
    at a._resolveFilename (node:electron/js2c/renderer_init:2:2669)
    at Module._load (node:internal/modules/cjs/loader:993:27)
    at c._load (node:electron/js2c/node_init:2:17025)
    at s._load (node:electron/js2c/renderer_init:2:31018)
    at Module.require (node:internal/modules/cjs/loader:1240:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/Users/brian.tully/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:3202:19)
    at Object.<anonymous> (/Users/brian.tully/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:3774:3)
    at Module._compile (node:internal/modules/cjs/loader:1373:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
    at Module.load (node:internal/modules/cjs/loader:1215:32)
    at Module._load (node:internal/modules/cjs/loader:1031:12)
    at c._load (node:electron/js2c/node_init:2:17025)
    at s._load (node:electron/js2c/renderer_init:2:31018)
    at Module.require (node:internal/modules/cjs/loader:1240:19)
    at require (node:internal/modules/helpers:179:18)
    at _traversePluginPath (file:///Applications/Insomnia.app/Contents/Resources/app.asar/mainWindow-DV0jvs_A.js:82:7926)
    at async getPlugins (file:///Applications/Insomnia.app/Contents/Resources/app.asar/mainWindow-DV0jvs_A.js:82:8922)
    at async st (file:///Applications/Insomnia.app/Contents/Resources/app.asar/mainWindow-DV0jvs_A.js:1444:63022)

Where do i find "index.js" and why is this bug closed?

@eminach
Copy link

eminach commented Nov 7, 2024

@briantully the index.js located under AppData\Roaming\Insomnia\plugins{pugin_name} folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

No branches or pull requests

4 participants