C3 r25 introduces a new addon testing mode

0 favourites
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Addon testing has been a little cumbersome in Construct 3, since you previously had to keep re-packaging a .c3addon file, and in some cases clear browser storage, to test an update to your addon. To fix this r25 adds a new addon testing mode which loads your addon from a local web server. This means C3 always loads the latest version of your addon files, making it much more convenient and quicker to iterate.

    The steps to enable this mode are described in the SDK documentation in the testing developer addons section.

  • I'm very excited about this new testing mode for the sdk. Very cool.

  • Any help on getting this to work with IIS (Windows 10)? I've got it browsing to it, but there still seems to be a CORS issue.

    main.js:2 Refused to connect to 'http://localhost/c3plugins/demoplugin/addon.json' because it violates the following Content Security Policy directive: "connect-src 'self' blob: wss://signalling.construct.net wss://build.construct.net https://downloads.scirra.com localhost:*".

    ne main.js:2

    ǃJ.ǃugK main.js:2

    ǃJ.ǃuTY main.js:2

    Je.ǃuo.then.le main.js:149

    main.js:2 Refused to connect to 'http://localhost/c3plugins/demoplugin/addon.json' because it violates the document's Content Security Policy.

    ne main.js:2

    ǃJ.ǃugK main.js:2

    ǃJ.ǃuTY main.js:2

    Je.ǃuo.then.le main.js:149

    main.js:149 Error loading addon JSON: TypeError: Failed to fetch

    at ne (main.js:2)

    at Function.ǃJ.ǃugK (main.js:2)

    at Function.ǃJ.ǃuTY (main.js:2)

    at Je.ǃuo.then.le (main.js:149)

    at <anonymous>

    ǃJ.ǃuTY.then.then.catch.pe main.js:149

  • Maybe try localhost:80 in the URL? The Content Security Policy specifies localhost:* which I don't think matches just localhost.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Same thing AND same error. That is, the :80 is dropped from the log report.

  • Maybe try Chrome Canary? I think that CSP syntax might be new.

  • Same thing.

  • Same problem, even using port 50001 and Canary.

    What is strange that when calling the addon.json directly, the Content-Security-Policy looks right. However, it's different from the Policy shown in the error in the Console when calling it through Construct.

    Any ideas?

  • I'm getting the same "Refused to connect" issue due to document's Content Security Policy. I've tried http://localhost:8080/addon.json and http://localhost:80/addon.json with the latest Chrome.

    Has anyone got this working? and ... what configuration worked?

  • Hmm, the CSP also had to be updated on the server side so maybe there's a caching issue. Try clearing the browser cache.

  • I was able to get past the content security policy by setting up my localhost server to use https. I think the mixed http/https content (localhost on http) was causing the security policy to barf.

    I'm now running into what I think is a CORS issue with my server ("resulted in a network error response: the promise was rejected.") I'll mess around with my tomcat server and see if this is a CORS issue as I suspect, and then I will try the non-secure localhost again to see if the CORS issue was my issue all along.

  • Is it possible to allow http urls for dev addons?

    Error in console when i'm trying to install such addon:

    Refused to connect to 'http://localhost:49152/photonC3/addon.json' because it violates the following Content Security Policy directive: "connect-src 'self' blob: wss://signalling.construct.net wss://build.construct.net https://downloads.scirra.com localhost:*".[/code:1jya5wjx]
  • It's meant to work over HTTP on localhost. I'm not sure why it's not working. I'm sure I tested this successfully before.

  • ThePhotons Awesome to see you're already working on a C3 plugin. Can't wait to try it out when it's done and migrate my project! Good job!

  • It's meant to work over HTTP on localhost. I'm not sure why it's not working. I'm sure I tested this successfully before.

    'localhost:*' is specified w/o protocol. What if add http:// there? Without protocol it allows at least https urls.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)