Error when calling createBuyOrder()
See original GitHub issueI get the following error when i try to place a bid with createBuyOrder().
TypeError: process.versions is undefined
XMLHttpRequest xml-http-request.js:92
prepareRequest httpprovider.js:61
sendAsync httpprovider.js:116
sendAsync requestmanager.js:80
send method.js:141
call function.js:140
promisifiedFunction promisify.js:58
promisifiedFunction promisify.js:54
step promisify.js:32
verb promisify.js:13
__awaiter promisify.js:7
__awaiter promisify.js:3
promisifiedFunction promisify.js:52
callAsync wyvern_exchange.js:774
step wyvern_exchange.js:42
verb wyvern_exchange.js:23
__awaiter wyvern_exchange.js:17
__awaiter wyvern_exchange.js:13
callAsync wyvern_exchange.js:768
_buyOrderValidationAndApprovals seaport.js:2736
step seaport.js:40
verb seaport.js:21
fulfilled seaport.js:12
promise callback*step seaport.js:14
fulfilled seaport.js:12
promise callback*step seaport.js:14
__awaiter seaport.js:15
__awaiter seaport.js:11
_buyOrderValidationAndApprovals seaport.js:2700
createBuyOrder seaport.js:556
step seaport.js:40
verb seaport.js:21
fulfilled seaport.js:12
promise callback*step seaport.js:14
__awaiter seaport.js:15
__awaiter seaport.js:11
createBuyOrder seaport.js:530
Here is the code that call the createBuyOrder method :
const result = await seaport.createBuyOrder({
asset: {
tokenId: this.asset.tokenId,
tokenAddress: this.asset.tokenAddress,
schemaName: this.asset.schemaName,
},
accountAddress,
startAmount: this.bid.value,
paymentTokenAddress,
});
I found the line in xhr2-cookies/dist/xml-http-request.js dependency :
_this._userAgent = "Mozilla/5.0 (" + os.type() + " " + os.arch() + ") node.js/" + process.versions.node + " v8/" + process.versions.v8;
Declaring a global object doesn’t seem to work :
window.process = window.process || {}:
window.process.versions = window.process.versions || { node: '', v8: ''}:
Could you please tell me what I am doing wrong and/or how I can fix this issue ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
seaport.createBuyOrder is not working - returns 429 error every time ...
Hi Team. I'm using code from the opensea-creatures project (sell.js) to create an OpenSeaPort instance and call seaport.createBuyOrder().
Read more >API Error 400: ['Expected exchange contract address to match']
Error while calling createBuyOrder(): API Error 400: ['Expected exchange contract address to match'] · I have enough wETH on my metamask account ...
Read more >Unhandled Rejection Opensea error while making Buying Items
This example provider won't let you make transactions, only read-only calls: const provider = new Web3.providers.
Read more >cloudflare access error WITHOUT requests - Moralis Forum
initPlugins() method and then call the Moralis.Plugins.opensea.createBuyOrder method. This is where the error starts, the method always ...
Read more >OpenSeaSDK | opensea-js
Approve a fungible token (e.g. W-ETH) for use in trades. Called internally, but exposed for dev flexibility. Checks to see if the minimum...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved declaring versions like this:
Checking in again, are you still running into this issue?