Mango icon indicating copy to clipboard operation
Mango copied to clipboard

[Bug Report] Subscription Manager always shows "No subscriptions found." even with subscriptions added

Open melyux opened this issue 3 years ago • 3 comments

Describe the bug The Subscription Manager always shows "No subscriptions found." despite subscriptions existing and working.

To Reproduce Steps to reproduce the behavior:

  1. Go to Download > Plugins, create a subscription, confirm that the subscriptions.json file exists under the plugin.
  2. Optionally, wait until a new chapter comes out and see that it downloads automatically.
  3. Go to Download > Subscription Manager.
  4. See "No subscriptions found.": image

Expected behavior I assume there's normally a table to view and edit existing subscriptions.

Environment (please complete the following information):

  • OS: Docker
  • Browser: Safari, Chrome
  • Mango Version: Latest (0.27.0)

Docker (if you are running Mango in a Docker container)

  • The docker-compose.yml file you are using, or your .env file.
  mango:
    image: hkalexling/mango
    container_name: mango
    expose:
      - 9000
    ports:
      - 9000:9000
    volumes:
      - ./mango/data:/root/mango
      - ./mango/config:/root/.config/mango

Additional context Add any other context about the problem here. Add screenshots if applicable. (See screenshot above)

I can see that the call to <base>/api/admin/plugin/subscriptions?plugin=<plugin> is returning the correct data. I see <p x-show="subscriptions.length === 0" class="uk-text-meta">No subscriptions found.</p> has the subscriptions.length === 0 condition on it (not familiar with the framework here), but I can see from a call to the API myself that subscriptions does not have a zero length.

melyux avatar Aug 15 '22 20:08 melyux

That's very strange. Did you see any error messages (from either the web UI or browser console) when loading the page? Normally the response from the API is passed immediately to the subscriptions array (JS code here)

hkalexling avatar Aug 18 '22 10:08 hkalexling

That's very strange. Did you see any error messages (from either the web UI or browser console) when loading the page? Normally the response from the API is passed immediately to the subscriptions array (JS code here)

No web UI nor console errors. That's why I'm not sure how to debug any further. I only have one plug-in, I'll try adding another one and see if it kickstarts the load upon switching to another plugin. And check the web server error logs, if I can find some. Maybe the internal API request to grab subscriptions per plugin is failing.

melyux avatar Aug 18 '22 17:08 melyux

I only have one plug-in, I'll try adding another one and see if it kickstarts the load upon switching to another plugin.

Ahh yes that's the issue. I just noticed a bug in the JS code. The subscriptions won't be loaded when you have only one plugin installed. Will fix this in the next update. Thanks for reporting!

hkalexling avatar Aug 19 '22 02:08 hkalexling