automainint / sea-offers-bot-js

Multiple buy orders bot for OpenSea.
MIT License
59 stars 18 forks source link

Freeze after fetch #8

Open paulevolve opened 2 years ago

paulevolve commented 2 years ago

There might be a bug or something in the fetch request or fetch cookie functions It doesn't happen to all assets only to some

The bot freezes on certain assets without returning any error. And the cache_timeout and fetch_timeout doesn't seem to apply. I've tried this on multiple devices with results. Here's an asset that it fails to fetch: https://opensea.io/assets/0xc6ec80029cd2aa4b0021ceb11248c07b25d2de34/137 Here's an image of the process: https://i.imgur.com/Adb4ZCv.png

Any ideas?

automainint commented 2 years ago

Can you reproduce this with asset in testnet?

automainint commented 2 years ago

What is your config?

automainint commented 2 years ago

Is there any messages from SDK? when you set "log_opensea": true

paulevolve commented 2 years ago

{"network": "mainnet", "log_opensea": "true", "fetch_timeout": "7000", "cache_timeout": "14000", "clear_cache_threshold": "1", "alchemy_key": "", "mnemonic": "", "wallet_address": "", "user_agent": "", "opensea_key": "", "skip_if_order_created": "true", "price_auto": "true", "price_floor": 0.01, "price_roof": 0.011, "price_epsilon": 0.00033, "cookie": "", "log_fetch": "true", "expiration": "1", "delay": "0", "log_full": "true"}

Here's my config file No, there are no SDK messages.

Did you try to make an offer on 0xc6ec80029cd2aa4b0021ceb11248c07b25d2de34/137 asset? Does it work for you?

paulevolve commented 2 years ago

I tried to test it on testnet but says my API key is invalid on testnet

automainint commented 2 years ago

I reproduced this bug with this asset: https://testnets-api.opensea.io/api/v1/asset/0xf7c68b84a8ad29a61af42fc31cef1964dd80f8ea/1

Looks like fetch works fine, but somewhere after the fetch SDK freezes...

I don't have a timeout for such case, that's why timeout options don't apply. Fetch timeout works only for fetch itself, and process timeout works for making a bid, not for getAsset call.

automainint commented 2 years ago

I tried to test it on testnet but says my API key is invalid on testnet

You don't need an API key on testnet. Or you can use default one: 5bec8ae0372044cab1bef0d866c98618

paulevolve commented 2 years ago

I reproduced this bug with this asset: https://testnets-api.opensea.io/api/v1/asset/0xf7c68b84a8ad29a61af42fc31cef1964dd80f8ea/1

Looks like fetch works fine, but somewhere after the fetch SDK freezes...

I don't have a timeout for such case, that's why timeout options don't apply. Fetch timeout works only for fetch itself, and process timeout works for making a bid, not for getAsset call.

Is this a bug from the new opensea update? Is it possible to add a timeout for this specific case?

automainint commented 2 years ago

Is this a bug from the new opensea update?

I think so. Haven't seen this before.

Is it possible to add a timeout for this specific case?

Yes.

paulevolve commented 2 years ago

Nice. Let us know if you intend in adding this feature. Thanks a lot for your work!

automainint commented 2 years ago

I will make an update shortly.

But I just discovered some new errors on some assets. So looks like SDK version 2.0 isn't quite ready yet.

paulevolve commented 2 years ago

Yea it's weird because on a collection for example I managed to send 10k out of 10k offers But most of the collections have 'non-working' assets.