Comments (25)
No, they didn't, unfortunately.
from roll20-api-scripts.
Thank you Cassie. Too bad this is not on your hands, anymore. I suppose I have to wait until one day the issue gets accidentally solved, or just look for another platform.
from roll20-api-scripts.
I hope it is due to some internal fix by Roll20
well, wing-it is doing coding stuff for roll20, so don't think he'd ask about this unless they applied a fix first.
from roll20-api-scripts.
I had the same problem with my scripts.
See https://app.roll20.net/forum/post/8008726/slug%7D
I am not 100% certain which of the things I tried actually fixed it, but I think it was ether changing my text editors encoding from UTF-8 BOM to UTF-8. Or it might have been rewriting my code to not store any of the extended character sets characters as literals.
In any case, there is something somewhere that Roll20 itself does not object to, but that the one-click library does object to.
Check your encoding, check for weird characters, and submit the script again, and the problem might just go away.
from roll20-api-scripts.
It was a UTF-8 BOM marker. I pushed a fix for this a month or so ago.
from roll20-api-scripts.
If a fix has been done, I think you can request this issue be closed.
from roll20-api-scripts.
@ChrisDDickey : Thanks for pointing that out. It is good to know that it's not the only script!
@shdwjk : I hadn't noticed your push, sorry. Unfortunately, you only corrected the doc (which shouldn't impact the one-click install, should it?), and that only for version 0.1, so the issue is still there. Did you just not find any UTF8-BOM in the other files? I couldn't find any such instance myself, but I may have missed it?
from roll20-api-scripts.
One additional point: the one-click install for the script used to work fine, until half a year ago. But the older versions (0.1 to 1.6), which have not changed, do not work anymore. So something changed on the Roll20 side...
from roll20-api-scripts.
6 months, and still no idea what is happening ? Could anyone help us debug the issue ?
from roll20-api-scripts.
@wing-it any comments?
from roll20-api-scripts.
I looked into this a few months ago. The issue is a syntax error in the script. I started taking out functions and was able to get it to work in the one-click however the script is so long that I wasn't able to find which function/s were an issue. You might try running it through a Javascript linter to see if there are any issues to fix and ensure the encoding is correct as mentioned above.
from roll20-api-scripts.
Hi @clevett . I did try jshint, and @Far2Casual passed esprima and jslint. Also, I would think that the best validator would be copy-pasting the code into the API sandbox, no? The fact that copy-paste and import work fine, without even an error message, suggests to me 3 possibilities:
- Roll20 uses a different parser for importing and adding. Maybe you (or someone from development team) could look whether there are any known differences between the two parsers?
- Roll20 does some source code modification when adding the code. We explored that possibility as much as we could, tracking special characters in the source code, and removing accented characters from variable names and fields. But maybe the developers know more about such phases?
- The issue lies in an other file. We did look at the script.json file, but didn't find any issue so far. Are there any other files involved?
On my side, there is not much left I can do. Maybe you could suggest a better validator than jshint, esprima or jslint? Or we could add a copy of the script to the git, so that I could bisect the issue? That would be awfully slow, but at least I could do something. Best would be if we could have more detailed syntax error messages: maybe the development team could give it a try with more verbose parser settings? Maybe there are other possible reasons for the issue I haven't thought of?
from roll20-api-scripts.
@Anduh @clevett As explained by @Ulty above we tried to track down simple syntax errors in the script using multiple JS linters, for no results. I believe that if there was such thing as a "simple" Syntax Error, the code would never work.
But it does work, when you c/p the code directly or you use the "Import" button in roll20. I have multiple working games with the script.
The script only specifically crashes when you use the "Add" button on roll20 to add it to your game. We suspect that it comes from some sort of code parsing or transformation that only specifically happen when that button is used. Maybe there is something in our code that's not compatible with that, but we have no way to investigate that.
from roll20-api-scripts.
Did the recent updates to the script fix this?
from roll20-api-scripts.
Issue is still open. No answer from the ticket I opened. Could the size of the script be an issue?
from roll20-api-scripts.
Last fall when I still worked for Roll20, I had started trouble shooting this on a local dev env by removing virtually all the code and piece by piece adding functions back to try to find where the error was. I threw in the towel after a few hours due to the sheer size of the script.
There is something in the script's JS that the Roll20 code doesn't approve of. Size is a possibility. I don't think there is a way for you to troubleshoot it since manually adding the script shows no errors.
Sorry this post isn't more helpful. I just wanted to share my experience of trying resolve this issue.
from roll20-api-scripts.
If you really want to solve the issue, your best option is to break this script down into multiple smaller scripts. This probably wouldn't be the best user experience and it would be a lot of work.
from roll20-api-scripts.
What I find the most surprising is that older versions of the script, that used to work just fine (could be installed using 'Add') do not work anymore. Even the first version of the script, which was only 8800 lines long, cannot be added anymore.
from roll20-api-scripts.
Can you please confirm this is still broken? I'm able to add this to a game with no problem.
from roll20-api-scripts.
I just tried it and it worked! I hope it is due to some internal fix by Roll20, because if that is a change in my code, I have no idea what the issue was...
from roll20-api-scripts.
Woohoo !
from roll20-api-scripts.
Actually, I had done some other work on the API before getting to this ticket. Was already fixed when I got to it, so I guess some of my previous work ended up fixing this unintentionally (as much as I would like to take credit).
from roll20-api-scripts.
lol
from roll20-api-scripts.
The script can now be installed through the 'Add' button, but when installed this way, all accented characters are replaced by series of question marks. Accented characters are displayed normally whein using the 'Import' button.
from roll20-api-scripts.
I believe the issue lies in the transformation of accented characters, somewhere in Roll20 chain when they add it to the game. It shouldn't be too hard to figure out which one it is, as accents are preserved with the 'Import' button, and no with the 'Add' button.
Anyway, I have a work-around, so I close this issue.
from roll20-api-scripts.
Related Issues (20)
- WildShape dependency is not working
- Critical Error - Carry Below While Initiative Tracker is Up
- TokenMod - Directional Low Light Fields Missing HOT 8
- [5th Edition OGL by Roll20 Companion] Spell Level undefined HOT 1
- API categorized as "hidden" still show up in API Script One-Click HOT 1
- HeroRoller doesn't work embedded in Character Sheets. HOT 3
- Shadowrun 5th Edition API Doesn't Populate Initiative Tracker HOT 2
- Remove older versions of script HOT 3
- Sandbox crash when lvlX_slots_expended is NaN (easy fix)
- Pull 1495 (for Initiative Tracker Plus) does not seem to have been merged properly. HOT 2
- Custom Token Markers not working with Status tracking
- chatSetAttr 1.10 not triggering sheet workers even though toggle is on
- Multi-world calendar is missing modern HOT 1
- Some Randomization
- Is One-Click update running slow? HOT 1
- Two Targets in chat don't work (one does) HOT 1
- Make scripts for sale on marketplace?
- Pull request #1772 been hanging around since 26/06/23 HOT 1
- Dungeon Alchemist Sends a message to all users when importing a new map.
- Script not available in Mod Library?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roll20-api-scripts.