Giter Club home page Giter Club logo

shopify-monitor's Introduction

GitHub Stats

WakaTime Top Langs

shopify-monitor's People

Contributors

subreme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shopify-monitor's Issues

Empty Restock Embeds

Bug Description

The webhook embeds for product restocks occasionally don't display any product variants as available.

To Reproduce

  1. Run monitor normally with the sizes option set to true
  2. Wait for a restocked product to quickly go Out of Stock
  3. Check webhooks on Discord

Expected Behavior

If a product were to go Out of Stock before the webhook notifying of its update is sent, the program should not send an empty embed.

The monitor could handle the scenario in one of the following ways:

  • Send "empty" embeds (current behavior)

This could make sense as it would be of no use to users for unavailable sizes to be marked as restocked, and would require no change to the program.

  • Do not send "variant-less" webhooks

This might not fare well with users, as the monitor may be perceived as "sub-par" if some restocks appear not to have been detected. This could be done by counting the number of fields in the embed after the message is generated before sending it.

  • Include all restocked variants anyway

The ideal "fix" would be to stop updating the list of available variants between the moment a restock is detected and the time the webhook is sent. If implemented incorrectly, this could result in some "segmented restocks" where a product is updated while another one's corresponding message is being generated is never detected, but this issue can be avoided.

Screenshots

Imgur

In the image above, the first product's restock is presented normally, however the second embed does not contain any available sizes.

Environment

  • OS: Linux (Manjaro)
  • Browser: Chromium
  • Version: v0.1.2

Additional Notes

This is not a platform-specific issue, but rather a design flaw in the way the program handles the list of products it is keeping track of.

I'm creating this issue as there are a lot of bugs I noticed but ended up forgetting about, never implementing their fixes, and hope that this way I'll remind myself of what I need to fix.

By actually trying it, I am also testing out the issue templates, which should help me come up with ways to improve them to update my rust-template repository. Including screenshots in the Bug Description section, for example, would probably be better.

Unclear Config Parsing Error Message

Hi,

When running the program with cargo run --release I got the following error: [ERROR] Invalid config file!.

My shopify-monitor.log file contains the following messages:

[2022-01-01 17:09:36.375] [HIDDEN] Starting Program...
[2022-01-01 17:09:36.376] [IMPORTANT] LOADING SETTINGS
[2022-01-01 17:09:36.376] [HIDDEN] Loading config.json...
[2022-01-01 17:09:36.376] [DEFAULT] Reading config file...
[2022-01-01 17:09:36.377] [HIDDEN] Failed to parse config.json: expected , or ] at line 571 column 3
[2022-01-01 17:09:36.377] [ERROR] Invalid config file!
[2022-01-01 17:09:36.377] [DEFAULT] Please follow the instructions on https://github.com/subreme/shopify-monitor to complete the configuration process.
[2022-01-01 17:09:36.377] [ERROR] Press Enter to close the program...

How can I solve this problem? I simply edited the original config.json, changing the Webhook URLs, as shown below:

{ "sites": { "AFEW": { "url": "https://en.afew-store.com", "logo": "afew", "delay": 5000 }, "asphaltgold": { "url": "https://www.asphaltgold.com", "logo": "asphaltgold", "delay": 5000 }, "atmos": { "url": "https://www.atmosusa.com", "logo": "atmos", "delay": 5000 }, "Bodega": { "url": "https://bdgastore.com", "logo": "bodega", "delay": 5000 }, "Concepts": { "url": "https://cncpts.com", "logo": "concepts", "delay": 5000 }, "Extra Butter": { "url": "http://extrabutterny.com", "logo": "extrabutter", "delay": 5000 }, "HANON": { "url": "https://www.hanon-shop.com", "logo": "hanon", "delay": 5000 }, "Jimmy Jazz": { "url": "https://www.jimmyjazz.com", "logo": "jimmyjazz", "delay": 5000 }, "Kith": { "url": "https://kith.com", "logo": "kith", "delay": 5000 }, "Notre": { "url": "https://www.notre-shop.com", "logo": "notre", "delay": 5000 }, "Packer": { "url": "https://packershoes.com", "logo": "packer", "delay": 5000 }, "Shoe Palace": { "url": "https://www.shoepalace.com", "logo": "shoepalace", "delay": 5000 }, "Sneaker Politics": { "url": "https://sneakerpolitics.com", "logo": "sneakerpolitics", "delay": 5000 }, "Travis Scott": { "url": "https://shop.travisscott.com", "logo": "travisscott", "delay": 5000 }, "UNDEFEATED": { "url": "https://undefeated.com", "logo": "undefeated", "delay": 5000 }, "West NYC": { "url": "https://www.westnyc.com", "logo": "westnyc", "delay": 5000 } }, "servers": [ { "name": "Test Server", "settings": { "username": "Shopify Monitor", "avatar": "https://avatars.githubusercontent.com/u/50165445", "color": null, "sizes": true, "thumbnail": true, "image": false, "footer_text": "go.go.go", "footer_image": "https://avatars.githubusercontent.com/u/50165445", "timestamp": true, "minimum": 0, "keywords": null }, "channels": { "#minimalist": { "url": "xxxx_url_webhook", "settings": { "image": true }, "sites": { "AFEW": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "asphaltgold": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "atmos": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Bodega": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Concepts": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Hanon": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Extra Butter": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Jimmy Jazz": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Kith": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Notre": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Packer": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Shoe Palace": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Sneaker Politics": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "Travis Scott": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "UNDEFEATED": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] }, "West NYC": { "events": [ { "restock": true, "password_up": true, "password_down": true } ] } } }, "#normal": { "url": "xxxx_url_webhook", "settings": { "sizes": true, "thumbnail": true, "footer_text": "go.go.go", "footer_image": "https://avatars.githubusercontent.com/u/50165445", "timestamp": true }, "sites": { "AFEW": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "asphaltgold": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "atmos": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Bodega": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Concepts": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Hanon": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Extra Butter": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Jimmy Jazz": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Kith": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Notre": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Packer": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Shoe Palace": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Sneaker Politics": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "Travis Scott": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "UNDEFEATED": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] }, "West NYC": { "events": [ { "restock": true }, { "password_up": true, "settings": { "color": "#e74c3c" } }, { "password_down": true, "settings": { "color": "#2ecc71" } } ] } } } } } } }

Updated timestamp changing randomly now

Looks like Shopify has made it so that updated_at is updating in seemingly random intervals even when no changes or orders are made. Any known workarounds?

Problem when opening the monitor in terminal

Hello sir, Got an error

[2023-03-31 09:45:21.668] Invalid config file! error on MacOS terminal what can i do ?
I have downloaded [shopify-monitor-0.1.2-macos-x86_64.sha256]& Source code
(zip) and i would like to test run this.
Capture d’écran 2023-03-31 à 09 51 36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.