eXaminator / kanka-foundry

FoundryVTT module to import information from kanka.io
MIT License
22 stars 8 forks source link

Kanka 2.0 broke something. #119

Closed Nedrapter closed 8 months ago

Nedrapter commented 8 months ago

Kanka has its update today. Something seems to have broken. After making a new token, it is not detecting any campaigns in my Foundry. image Not sure if relevant but I want to mention: my campaign from boosted changed to premium (the old system and the new for subscribers) and instead of a random number it now has a vanity url.

eXaminator commented 8 months ago

Hi @Nedrapter ,

have you updated to the latest version? I have released two new versions of the module that fixed bugs regarding the Kanka 2.0 integration just about 1 or 2 hours before you posted.

If this error still persists: Could you please check the devtools console on your browser or Foundry client (usually F12 on Windows or Cmd + alt + i on mac, then make sure you're on the "console" tab) for any (red) errors that might be related to Kanka? You might want to reload Foundry (F5 or Cmd + R) to make sure you see any errors coming up when initializing the module. It would be very helpful if you could post copies or screenshots of those errors here.

Thanks!

Nedrapter commented 8 months ago

I'm on Kanka module version 3.1.11 I see the following error related to Kanka: image I have reloaded and relaunched my worlds.

eXaminator commented 8 months ago

Error 401 means you are not authorized to access that URL (in this case the list of campaigns). Could you please generate a new access token in Kanka and try that? Maybe your token has expired. If that still doesn't work I'll investigate a bit more in regards to vanity URLs, though I'm not sure why that would result in a 401 error 🤔

Nedrapter commented 8 months ago

Error 401 means you are not authorized to access that URL (in this case the list of campaigns). Could you please generate a new access token in Kanka and try that? Maybe your token has expired. If that still doesn't work I'll investigate a bit more in regards to vanity URLs, though I'm not sure why that would result in a 401 error 🤔

Made a new one just now. Same result.

Nedrapter commented 8 months ago

image This also was in the console now

eXaminator commented 8 months ago

Thanks for all the info. I'll look into this soon and will try to fix the issues.

eXaminator commented 8 months ago

@Nedrapter I still cannot reproduce this issue on my end.

I have just released a new version of the module that has fixed some issues with generating links to kanka. Could you please see if this makes any difference?

Here are some of my thoughts:

So here are two thinks I'd like you to make 100% sure:

If the issues keep appearing I would like some more info from you to try and resolve this issue:

  1. When in the "devtools" go to the "network" tab.
  2. Reload foundry (as mentioned in one of my previous comments).
  3. If the error didn't happen yet, open the Kanka Browser (via the Kanka button in the Journal Sidebar) to make sure you run into the error.
  4. You should now see a (probably long) list of network requests, at least one of which should be marked in red.
  5. Click on the red network request and you should see some details abut that request.

Please add some copies or screenshots of the following:

If you see multiple "red" requests that seem to be related to Kanka, please repeat the above steps for all of them.

Hopefully we can find what is causing this issue for you. :)

Nedrapter commented 8 months ago

Made a 4th new token but from a different browser. It seemed to work passed the step I had issues with. Then it wasn't saving my campaign choice. Then after a reload of the world, it worked. Not sure if copying it from Opera was the issue (then used Firefox), or the 4th new token fixed it... Thanks for the assistance though!

icewolf08 commented 8 months ago

I am also getting a similar error and not able to get the plugin to connect. I have tried three new API tokens including creating one in a different browser. I am getting the following errors: image image It looks like the plugin is trying to call an incorrect url: https://api.kanka.io/api/1.0/campaigns but I think it should be: https://api.kanka.io/1.0/campaigns based on all the info and screenshots in previous posts.

eXaminator commented 8 months ago

Hi @icewolf08 ,

yep, the URL in that screenshot is wrong. Please make sure you have set "api.kanka.io" as base URL in the settings and have also updated to the latest version of the module. That should hopefully fix it for you.

icewolf08 commented 8 months ago

@eXaminator it seems that it was something stuck in my browser cache. Killing chrome and re-launching allowed it to work correctly.

eXaminator commented 8 months ago

Thanks for letting me know. I will close this issue now. Let me know if you have any more errors and I'll reopen it.