Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] URL to faulty module's page is run-in with following sentence, merging the two #73

Closed
mkahvi opened this issue Nov 14, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@mkahvi
Copy link

mkahvi commented Nov 14, 2022

Confirm you have read the above
The bug is in libWrapper's own error about it not being libWrapper error.

Describe the bug
"Report this issue here:" text is run in with previous URL, causing the "Report" part to be part of the URL.

Example of the bit in question:

Find information about this module here: https://gitlab.com/koboldworks/pf1/sheetReport this issue here:

Notice how Report is run-in with the URL?

To Reproduce
Steps to reproduce the behavior:

  1. Cause an error that libWrapper reports.

Expected behavior
The link to not include "Report" from the following sentence.

Screenshots
Screenshot 2022-11-14 170158

Technical Details (please complete the following information):

  • LibWrapper Version: 1.12.10.0
  • FoundryVTT Version: 10.290
@mkahvi mkahvi added the bug Something isn't working label Nov 14, 2022
@ruipin
Copy link
Owner

ruipin commented Nov 14, 2022

Thank you so much for this detailed bug report! I don't have time right now to look into it, but I'll try to find some time this week.

@ruipin
Copy link
Owner

ruipin commented Nov 15, 2022

What browser are you using?
Can you post the entire error message?

Also what version of the pf1 sheet module are you using? Any other requirements to see this exact message?

I am unable to reproduce, unfortunately. All such errors I can generate myself have the proper line-break at that position.
Code inspection does not show any obvious code path where this should be possible, so I am probably missing something.

@mkahvi
Copy link
Author

mkahvi commented Nov 15, 2022

It appeared while I was developing the module more and I caused bugs.

PF1 0.82.2, Foundry 10.290 with Electron client, Win10,...

I don't think there's anything unusual about the URL field either to cause it: https://gitlab.com/koboldworks/pf1/sheet/-/blob/master/release/module.json#L37

@ruipin
Copy link
Owner

ruipin commented Nov 15, 2022

What was the exact exception type?

For instance, LibWrapperPackageError or LibWrapperAlreadyOverriddenError?

They have different code paths for the message, so it would help narrow it down.

@mkahvi
Copy link
Author

mkahvi commented Nov 15, 2022

That I do not remember. And I don't remember what the error itself was. I can try making something break, I guess.

@ruipin
Copy link
Owner

ruipin commented Nov 15, 2022

Nevermind, I think I found the problem. Thanks for the help!

@mkahvi
Copy link
Author

mkahvi commented Nov 15, 2022

Well, for post-humous reasons...
This is probably what caused the error at least.

const registerSheetOverride = () => {
	if (!game.settings.get(CFG.id, CFG.SETTINGS.defaultInfoSheet)) return;
	/* global libWrapper */
	libWrapper.register(CFG.id, Item.prototype._getSheetClass, softOverrideDefaultSheet, libWrapper.MIXED);
}

Hooks.once('init', registerSheetOverride);

Missing quotes on the override target.

Screenshot 2022-11-15 161516

@ruipin
Copy link
Owner

ruipin commented Nov 15, 2022

Fixed in v1.12.11.0. Thanks for your help!

Turns out I had broken this in v1.12.9.0.

Closing this, let me know if you encounter this again.

@ruipin ruipin closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants