trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.31k forks source link

File paths from whoever did the release are appearing in debugger stacktraces again #4662

Open haltman-at opened 2 years ago

haltman-at commented 2 years ago

Issue

E.g., this stacktrace I got on my machine:

TypeError: this._prepareRequest is not a function
    at HttpProvider.send (/home/sniffnoy/truffle/debug-lib-repro/node_modules/web3-providers-http/lib/index.js:86:24)
    at internal/util.js:340:30
    at new Promise (<anonymous>)
    at promisify (internal/util.js:339:12)
    at xn.getTrace (/Users/leefaria/code/truffle/packages/debugger/lib/web3/adapter.js:13:24)
    at runCallEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:528:21)
    at runEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1208:7)
    at digestEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1275:5)
    at next (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1165:9)
    at proc (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1112:3)
    at /home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:589:17
    at immediately (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:60:12)
    at runForkEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:588:3)
    at runEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1208:7)
    at digestEffect (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1275:5)
    at next (/home/sniffnoy/truffle/debug-lib-repro/node_modules/@redux-saga/core/dist/redux-saga-core.dev.cjs.js:1165:9)

Notice the /Users/leefaria/... in there.

I'm hoping there's some way to fix this by fiddling with the webpack settings?

Environment

eggplantzzz commented 2 years ago

Oh, I didn't know that this was ever resolved. I talked to @gnidan when @lsqproduction did the release (because her file paths were present in stacktraces) and he said that "it is a known issue".

gnidan commented 2 years ago

Oh, I didn't know that this was ever resolved. I talked to @gnidan when @lsqproduction did the release (because her file paths were present in stacktraces) and he said that "it is a known issue".

Didn't @michaeljohnbennett have a solution for this? Thought it got merged and everything (unless I'm just mistaken)

haltman-at commented 2 years ago

Yes, the problem was solved, but now it appears to have been unsolved. Presumably it's all related to @michaeljohnbennett's work on the debugger's webpack settings.

haltman-at commented 2 years ago

OK, looking into this a bit, it seems like this ought to be possible by not using devtool, and instead using the SourceMapDevToolPlugin; specifically the fileContext option. Yet for some reason, it seems like none of the options I pass to this plugin are being respected! No idea what's going wrong here...

kevinbluer commented 2 years ago

Note that this is related to the fact that we don't have a fully automated release process. Also a possible interim fix could be for whomever's doing the release do to it from a /Users/truffle path.