Failed to register service worker: SecurityError

Bugs will be moved here once resolved.

Post » Thu Jun 15, 2017 5:51 pm

Message: eddieone can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
Problem Description
Hi, I work for and am trying to get the c2 plugin working again. However, I get an cross domain security error when exporting. Preview is fine. Sadly, there is no stack trace. The following is the full error.

Failed to register service worker: DOMException [SecurityError: "The operation is insecure."
code: 18
nsresult: 0x80530012

plugin is here ... struct-sdk

Attach a Capx

Description of Capx
default project with plugin, has login, save data, load data

Steps to Reproduce Bug
  • install plugin
  • open dev2.capx
  • export and view online

Observed Result
security error, no stack trace. The error goes away when server on https though. In preview the plugin works. After export, it does not.

Expected Result
no security error. At least some stack trace.

Affected Browsers
  • Chrome: YES
  • FireFox: YES
  • Internet Explorer: PROBABLY

Operating System and Service Pack
Windows 10

Construct 2 Version ID
Posts: 7
Reputation: 416

Post » Thu Jun 22, 2017 4:01 pm

You need to host on a secure server (HTTPS) for offline support to work, which is provided by a Service Worker (hence the error message). The game should however continue to work. Closing as not a bug.
Scirra Founder
Posts: 25,073
Reputation: 199,682

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest