Giter Site home page Giter Site logo

Comments (25)

Ulty avatar Ulty commented on July 24, 2024 1

No, they didn't, unfortunately.

from roll20-api-scripts.

Ulty avatar Ulty commented on July 24, 2024 1

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.

Anduh avatar Anduh commented on July 24, 2024 1

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.

ChrisDDickey avatar ChrisDDickey commented on July 24, 2024

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.

shdwjk avatar shdwjk commented on July 24, 2024

It was a UTF-8 BOM marker. I pushed a fix for this a month or so ago.

from roll20-api-scripts.

ChrisDDickey avatar ChrisDDickey commented on July 24, 2024

If a fix has been done, I think you can request this issue be closed.

from roll20-api-scripts.

Ulty avatar Ulty commented on July 24, 2024

@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.

Ulty avatar Ulty commented on July 24, 2024

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.

Far2Casual avatar Far2Casual commented on July 24, 2024

6 months, and still no idea what is happening ? Could anyone help us debug the issue ?

from roll20-api-scripts.

Anduh avatar Anduh commented on July 24, 2024

@wing-it any comments?

from roll20-api-scripts.

clevett avatar clevett commented on July 24, 2024

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.

Ulty avatar Ulty commented on July 24, 2024

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.

Far2Casual avatar Far2Casual commented on July 24, 2024

@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.

Anduh avatar Anduh commented on July 24, 2024

Did the recent updates to the script fix this?

from roll20-api-scripts.

Ulty avatar Ulty commented on July 24, 2024

Issue is still open. No answer from the ticket I opened. Could the size of the script be an issue?

from roll20-api-scripts.

clevett avatar clevett commented on July 24, 2024

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.

clevett avatar clevett commented on July 24, 2024

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.

Ulty avatar Ulty commented on July 24, 2024

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.

wing-it avatar wing-it commented on July 24, 2024

Can you please confirm this is still broken? I'm able to add this to a game with no problem.

from roll20-api-scripts.

Ulty avatar Ulty commented on July 24, 2024

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.

Far2Casual avatar Far2Casual commented on July 24, 2024

Woohoo !

from roll20-api-scripts.

wing-it avatar wing-it commented on July 24, 2024

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.

Anduh avatar Anduh commented on July 24, 2024

lol

from roll20-api-scripts.

Ulty avatar Ulty commented on July 24, 2024

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.

Ulty avatar Ulty commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.