DEV Community

Discussion on: Deploy NFTs with Truffle, IPFS OpenSea & Polygon

Collapse
 
frdx profile image
frdx

I am getting these errors when trying to migrate, any ideas?

descent_v2\node_modules\@trufflesuite\web3-provider-engine\subproviders\rpc.js:57
const err = new Error(msg)
^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: Unknown Error: invalid project id

at Request._callback (D:\eth\descent_v2\node_modules\@trufflesuite\web3-provider-engine\subproviders\rpc.js:57:23)
at Request.self.callback (D:\eth\descent_v2\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (D:\eth\descent_v2\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (D:\eth\descent_v2\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
at PollingBlockTracker._performSync (D:\eth\descent_v2\node_modules\eth-block-tracker\src\polling.js:51:24)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Enter fullscreen mode Exit fullscreen mode

UnhandledRejections detected
Promise {

Collapse
 
yournewempire profile image
Archie Smyth

Hey, sorry for a very late reply. I have been super busy/stressed this week.

RPC is a request-response protocol that web3 or ethers can use to call nodes/servers. 'invalid project id' should be your matic app-id suggests the following:
You may have incorrectly configured the .env file:
This could be that you have copied the app id over incorrectly (missed a character or something).
Or you have named your env vars differently. For example, the var name in the env file is different to the 'process.env.var_name' in your code.

We know the error is when you are trying to migrate. I would check the truffle-config.js carefully. Look at your env vars and how they are passed into the networks object.

Look forward to your response. All the best in your dev adventures!