eXaminator / kanka-foundry

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

Kanka Characters Won't Link to Foundry #128

Closed tahardy3 closed 5 months ago

tahardy3 commented 8 months ago

I am unsure if this is user error or not, but I have been using the importer for several months now within the past week or two have been unable to update or link actors/characters to the Journal as I could before. I click the button, it lights up and then nothing happens.

I looked in the console and it seems to be displaying a lot of RateLimiter, but I am only trying to link one item and I am unsure what I might need to do to proceed. Additionally, when I click on the item it says type undefined, if that helps at all. Screenshots included.

Kanka

nbojon commented 8 months ago

Hi, Sorry if that's the wrong place, but similar issue here image

I tried to link manually, but it does not work (btw, there are the same entities that do not synchronize w/ "link all".

I tried on 2 instances (Mac / PC) of a local foundy, kanka 4.0.5 and 4.0.4

nbojon commented 6 months ago

Hi, I have no technical BG, but don't know if this could help understanding: Does it mean that I have entities whose ID is somewhat not ok ?

logger.ts:9 kanka-foundry | Error: Could not find family with ID '153035' at He.getFamily (KankaApi.ts:128:28) at async updateEntity (syncEntities.ts:38:20) at async Promise.all (index 0) at async HTMLButtonElement. (KankaBrowserApplication.ts:299:31) foundry.js:68326 An error occurred while performing the requested action.

eXaminator commented 6 months ago

Right. Could it be that the family of the character you are trying to import was deleted at some point?

nbojon commented 6 months ago

Right. Could it be that the family of the character you are trying to import was deleted at some point?

Hi. I'm honestly don't know, but I tried with one entity that could not be import: 1. I duplicated w/ kanka; gave a new name, tried to import -> same result. Also, it seems to import "better" now (and I don't know why), most entities that appear as "red" in the import menu still have their content. However some (not all) of them have some kind of error message instead of the "Organisation" Snag_17ace4af

TL/DR it looks like to me that changing name / creating a new entity does not solve the issue of having a "downloading" statute on the import menu but now (i updated the game system) , it seems that (some ? I couldn't check all yet) entities have their content (test + image) imported from kanka in foundry despite the "downloading statute). So that's better.

Also, I don't know if it is usefull or not, I got this too (I am not using a browser, I use local install of foundry):

Snag_17b42cb2

(and, btw, many thanks for this huge mod, greatly appreciated within my group)

eXaminator commented 6 months ago

So the first error you seen comes up when a character is linked to a family that I cannot get from the Kanka API (probably when it was deleted). So you could try to to set a new family for that character and see if that works.

The second error is less clear to me. I'll have to look into it and see if I can reproduce it.

Sadly, I don't know what you mean by "downloading statute". So I'm not sure what the problem is besides the two errors you shared. Do you only get partial data for your entities? Or is it something else?

Could you explicitly explain and show me the steps you take and tell / show me:

eXaminator commented 6 months ago

@nbojon I was able to replicate your problems to some degree. A new version will be released soon that will improve those.

  1. The Problem with the "notAvailable" label will be fixed.
  2. The sync problem is something I don't think I can fix. It happens when the entity you are trying to sync cannot be requested from Kanka, usually because it was deleted. So if you sync an entity, then delete it in Kanka and try to update it in Foundry, it will break. I imrpoved the error handling for this so that you should get a better error message. That beeing said, you SHOULD also see a tab with all deleted entities that you have previously synced in the Kanka Browser (unless those entities were imported from another Kanka campaign):
image

If you don't see that but are still unable to sync an entity from Kanka let me know. But I'm unsure what the problem might be in that case.

nbojon commented 6 months ago

Hi, thank for your message.

I was trying to made my explanations a bit more clear (no native english here, and no tech bkg), So I tried to make some video slide to explain what happens and capture more detailled error msg https://drive.google.com/drive/folders/1MMbRwJxknY2uRbtWPoEF7xmGYMkbPPSl?usp=drive_link

From what I understand:

I hope this can help.

Anyway, many thanks again for your time and work. If I dare, and also would like to ask if kanka entry embedded video are supposed to be exported into foundry ? I made some kind of "e learning module" for my players, the journal has been created in foundry from kanka, but the video is not there (embedded video from screencast plateform).

HAve a nice day / week end Le vendredi 29 mars 2024 à 10:56, Steven Weingärtner @.***> a écrit :

@.***(https://github.com/nbojon) I was able to replicate your problems to some degree. A new version will be released soon that will improve those.

  • The Problem with the "notAvailable" label will be fixed.
  • The sync problem is something I don't think I can fix. It happens when the entity you are trying to sync cannot be requested from Kanka, usually because it was deleted. So if you sync an entity, then delete it in Kanka and try to update it in Foundry, it will break. I imrpoved the error handling for this so that you should get a better error message. That beeing said, you SHOULD also see a tab with all deleted entities that you have previously synced in the Kanka Browser (unless those entities were imported from another Kanka campaign): image.png (view on web)

If you don't see that but are still unable to sync an entity from Kanka let me know. But I'm unsure what the problem might be in that case.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

eXaminator commented 6 months ago

I just released an update (well, 2 actually) which should fix some of your issues, but maybe not all. The issues with the broken labels should be fixed now.

The warnings / errors in your console seem to be related to the system. What system are you using? But I don't think they have anything to do with the problems you are seeing using my module.

In regards to the missing character-copy in the organisation: Have you updated the organisation or only the character? The organisation needs to be updated in order for any change on the organisation (like new members) to show up there.

In regards to your question about the video: I don't know about embedded videos (I guess you mean embedded in some text field?), but if you just add the video as an attachment to an entity in Kanka (for example on a Note) and sync that entity to Foundry, you should get a "video" page in Foundry where you can play that video.

nbojon commented 6 months ago

Hi,

I tested quickly, you're rigth I might have not update organisation correctly; I tried this, and this is fixed.

I still have the "orange bar and updating" icon on the characteurs & entities with new version, and the label issue looks like fixed.

Then, today the mods globally works for me some minor annoyement, but functionnal.

Thks !

Le vendredi 29 mars 2024 à 13:33, Steven Weingärtner @.***> a écrit :

I just released an update (well, 2 actually) which should fix some of your issues, but maybe not all. The issues with the broken labels should be fixed now.

The warnings / errors in your console seem to be related to the system. What system are you using? But I don't think they have anything to do with the problems you are seeing using my module.

In regards to the missing character-copy in the organisation: Have you updated the organisation or only the character? The organisation needs to be updated in order for any change on the organisation (like new members) to show up there.

In regards to your question about the video: I don't know about embedded videos (I guess you mean embedded in some text field?), but if you just add the video as an attachment to an entity in Kanka (for example on a Note) and sync that entity to Foundry, you should get a "video" page in Foundry where you can play that video.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

eXaminator commented 6 months ago

The issue with the entities that are marked as "outdated" is known but hard for me to reproduce, which is why I haven't investigated it yet. But it shouldn't impact the module in a meaningful way.

@tahardy3 Your issue has been kind of hijacked here, I apologize for that. Could you please let me know if your initial issue still persists? If it does I would need some more information.

Regarding the screenshot you shared: The RateLimiter does what it's supposed to. There is a limit on how many requests the module can make to Kanka within 1 minute and the rate limiter tries to – well – limit the number of requests to Kanka. Syncing one entity can necessitate a lot of requests if it is linked to a lot of other entities in some way (or if you have a lot of entities in your campaign in gerenal). I'd have to look into the type thing to see if that is the problem. Did you try to sync from the KankaBrowser (the list where all entities are listed) or from within the journal entry of an already synced entity?

If it was the latter, please try syncing from within the list window. It could be that your synced entity has a problem (maybe due to a problematic migration from an earlier module version). Syncing from the list could hopefully fix that.

eXaminator commented 5 months ago

Since there has been no answer I'll close this issue for now. Let me know if I should reopen it.

nbojon commented 5 months ago

I Steven,

I had few time to play / do kanka lately. I relaunched my games, and still have this kind of stuff on the import browser (which do not concerne deleted entities):

However, displayed data w. those characters lokks like correct; so IMHO for now it looks like a display bug,I guess.

Kudo again for your work !

[image.png] Le dimanche 5 mai 2024 à 13:38, Steven Weingärtner @.***> a écrit :

Since there has been no answer I'll close this issue for now. Let me know if I should reopen it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>