OriginProtocol / dshop

Origin Dshop - launch your own decentralized store
https://www.originprotocol.com/dshop
MIT License
138 stars 87 forks source link

Orders on UFHL Shop not showing up in Printful #801

Closed gullible1 closed 3 years ago

gullible1 commented 3 years ago

There are 3 orders that were successfully processed on the UFHL Dshop (https://ultimate-franchise-fantasy-sports.ogn.app) but weren't sent to Printful for fulfilment. The auto-fulfilment check box is checked for the Printful app.

Seems like there are two stores with very similar names (UFHL shop and UFHL Shop), so perhaps this is related to #518 again?

shahthepro commented 3 years ago

It was a config cache issue. I had to reconnect their printful to get it working. We should probably spend some time to see why we have been having a lot of config cache issues lately. cc @franckc

franckc commented 3 years ago

Thanks @shahthepro! Can you be more specific about what you mean by "config cache"? Do you know which function was trying to read the config and got an old version of the config?

shahthepro commented 3 years ago

@franckc The shopConfig (in DB) had the printful key set and it was shown in the frontend too. But the queue processor seemed to not have the latest shopConfig. This was the line, it was short-circuiting: https://github.com/OriginProtocol/dshop/blob/master/backend/logic/order/index.js#L322

I checked the code but didn't find any usage of encConf.get anywhere since we changed that to encConf.getConfig everywhere already.

franckc commented 3 years ago

Thanks @shahthepro for the details... this is really odd. I can't figure out neither how this could have happened :(\ Let's keep an eye for similar errors so we can figure the root cause.