Where's the official list of processing.js compatible browsers?

edited September 2017 in JavaScript Mode

I ask because http://processingjs.org/articles/p5QuickStart.html#runningpjswebpage says

"In case it isn't obvious, you run your hello-web.pde sketch by loading your hello-web.html web page in a compatible browser"

yet latest Chrome responds:

XMLHttpRequest cannot load file. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Answers

  • Yup, that reminds me why I need the answer! :)

  • edited September 2017

    Well, that reminds me we need posted examples in order to better answer! ;;)
    Host & post the link for a runnable example of your issue at https://OpenProcessing.org/sketch/create
    Don't forget to switch to Processing.js Mode. You can also upload asset files there. :)>-

  • Are you trying to run the sketch from your desktop? Tried Firefox?

  • Well, that reminds me we need posted examples in order to better answer!

    "Where's the official list of processing.js compatible browsers?" doesn't need examples for an answer.

    Host & post the link for a runnable example of your issue

    My issue is that I can't find the official list of processing.js compatible browsers.

  • AFAIK, any HTML5 browser is capable of running the PJS library.
    Something like Firefox 4 and on! :>

  • edited September 2017

    @chrisjj -- you described two things: a problem ("Cross origin requests") and your proposed solution (find an officially compatible browser). You seem very focused on the latter, and for that I would say "try Firefox."

    HOWEVER the issue with cross origin requests is not strictly a compatibility issue -- it is a security issue, with most contemporary browsers and operating systems discouraging you from running Javascript in the browser in specific (insecure) ways. Almost any browser works with Processing.js -- they just work in specific ways.

    This means that if you deployed the same code differently (e.g. posting it to a website instead of running from your desktop) or configured your existing browser differently (e.g. allowing CORS), your issue would probably go away -- with the same code and the same browser. I say "probably" because you seem very sure you don't need to give examples to get an answer, and that switching browsers is the best way to solve your problem, so you haven't shared anything.

  • I'll report the question without the evidently confusing reason for it.

  • Good luck with that!

  • @chrisjj - You said:

    My issue is that I can't find the official list of processing.js compatible browsers.

    From the About Processing.js section:

    Processing.js takes this to the next level, allowing Processing code to be run by any HTML5 compatible browser, including current versions of Firefox, Safari, Chrome, Opera, and Internet Explorer.

    I think that's official enough...

    You also said:

    yet latest Chrome responds:

    XMLHttpRequest cannot load file. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

    As @jeremydouglass was trying to enlighten you: questions with this particular type of error crop up rather regularly on the forum - as you will find if you perform a search. The issue is most likely caused by browser security restrictions. In order to help you solve your particular problem you will need to provide more information - e.g. are you running your code on a local test server or from the local file system? Have you tried Firefox? What is the URL you are trying to request? Can you post sample code that reproduces the problem?

    You have a rather obtuse way of asking questions and responding to people's attempts to help. I suggest you read this ;)

  • TML5 compatible browser, including current versions of Firefox, Safari, Chrome, Opera, and Internet Explorer.

    Well, that's odd. Because the quick start fails on Chrome, as I described.

    e.g. are you running your code on a local test server or from the local file system?

    Local file system, as per the quick start: "Web browsers will provide you a way to load a local file, usually using the File menu and then Open File..."

    Have you tried Firefox?

    No, since that won't answer the question.

    What is the URL you are trying to request?

    None.

    Can you post sample code that reproduces the problem?

    Not needed. The quick start example shows the failure http://processingjs.org/articles/p5QuickStart.html#quickstart and actually I suspect every other processing sketch does too. But if you've got code that DOESN'T suffer the failure, I'd love to see it.

  • 8-}

    You have a rather obtuse way of asking questions and responding to people's attempts to help.

    This is what I'm talking about:

    Have you tried Firefox?

    No, since that won't answer the question.

    It may well be that the processing.js quick start guide is out of date; but that doesn't excuse your rudeness. I - and most of the other people who voluntarily answer questions on this forum - have no direct connection to processing.org, p5.js etc. If things don't work as described in the documentation raise an issue with the authors. If you want help from the forum then take advice as it is intended and respond with courtesy.

    For what it's worth the error you reported may be caused because Chrome tends to have stricter security when running files from the local system. This could have changed since the documentation was originally written. Firefox is known to be less strict when running from the local file system. You making the effort to try it would likely pinpoint this to a browser security issue and we could then provide a way forward should you not wish to use Firefox.

    Here ends my contribution to this thread and any future discussions you may begin; though TBH I don't post here often these days so no big deal :P

  • It may well be that the processing.js quick start guide is out of date

    "May well"? Are you in doubt?

    If things don't work as described in the documentation raise an issue with the authors.

    Thanks for the suggestion.

  • @chrisjj

    But if you've got code that DOESN'T suffer the failure, I'd love to see it.

    I'd love to show you!

    Here is example code running in three compatible browsers. I took it from the official QuickStart tutorial:

    hello-web.pde

    void setup() {
      size(200, 200);
      background(100);
      stroke(255);
      ellipse(50, 50, 25, 25);
      println("hello web!");
    }
    

    index.html

    <script src="processing.min.js"></script>
    <canvas data-processing-sources="hello-web.pde"></canvas>
    

    processing.min.js

    Download from official downloads 1.4.8.


    ...I am now viewing the running sketch in three browsers:

    1. Google Chrome -- version 60.0.3112.101 (Official Build) (64-bit)
    2. Safari -- version 10.1.2 (12603.3.8)
    3. Firefox -- version 55.0.3 (64-bit)

    It looks great in all three of them! I'm taking a screenshot now -- it looks like this:

    Screen Shot 2017-09-19 at 9.49.37 PM

    Since, as you have repeatedly explained, the only information you need is a list of compatible browsers, I am happy to provide you with the only information you requested: recent versions of Firefox, Chrome, and Safari are demonstrably compatible with the QuickStart example.

Sign In or Register to comment.