@fdellwing opened this Issue on February 28th 2018 Contributor

This problem is quite strange, but reproduce able.

  1. Open some post in the forum that contains any external link, e.g. https://forum.matomo.org/t/piwik-empfangt-trotz-erfolgreicher-installation-keine-daten/25912/5
  2. Click on the link
  3. Use the back function of your browser
  4. Cannot load app - It looks like you are offline! Please check your network connection and try again.

Even a hard reload does not fix it, it seems like something gets lost there.

@fdellwing commented on February 28th 2018 Contributor

After leaving this post I discovered, that the link above is not working. So it seems like something is completely preventing hot-linking any thread in the forums.

@Findus23 commented on February 28th 2018 Member

Hi, thanks for reporting.
I can't really reproduce this. When I click on the link in the forum post it opens in a new tab and when I close that again he forum works as before.

Can you show if there are errors in the Javascript console? And maybe provide a bit more general information (which browser are you using?).

@fdellwing commented on February 28th 2018 Contributor

No errors in DevTools.

For me the link in forum is not opening in a new tab! It opens in the same tab and after using back button, not luck. Does the link above work for you?

Here the HAR of that connection:

{
  "log": {
    "version": "1.1",
    "creator": {
      "name": "Firefox",
      "version": "58.0.2"
    },
    "browser": {
      "name": "Firefox",
      "version": "58.0.2"
    },
    "pages": [
      {
        "startedDateTime": "2018-02-28T15:05:12.933+01:00",
        "id": "page_1",
        "title": "Piwik empfängt trotz erfolgreicher Installation keine Daten - Deutschsprachiges forum (German) - Matomo forums",
        "pageTimings": {
          "onContentLoad": -1,
          "onLoad": -1
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2018-02-28T15:05:12.933+01:00",
        "time": null,
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://forum.matomo.org/t/piwik-empfangt-trotz-erfolgreicher-installation-keine-daten/25912/6",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Host",
              "value": "forum.matomo.org"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
            },
            {
              "name": "Accept",
              "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
            },
            {
              "name": "Accept-Language",
              "value": "de"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            }
          ],
          "cookies": [],
          "queryString": [],
          "headersSize": 0
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "server",
              "value": "openresty"
            },
            {
              "name": "date",
              "value": "Wed, 10 Jan 2018 12:05:21 GMT"
            },
            {
              "name": "content-type",
              "value": "text/html; charset=utf-8"
            },
            {
              "name": "transfer-encoding",
              "value": "chunked"
            },
            {
              "name": "connection",
              "value": "keep-alive"
            },
            {
              "name": "x-frame-options",
              "value": "SAMEORIGIN"
            },
            {
              "name": "x-xss-protection",
              "value": "1; mode=block"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "x-discourse-route",
              "value": "offline/index"
            },
            {
              "name": "cache-control",
              "value": "no-store, must-revalidate, no-cache, private"
            },
            {
              "name": "x-discourse-trackview",
              "value": "1"
            },
            {
              "name": "content-encoding",
              "value": "gzip"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "text/html; charset=utf-8",
            "size": 717,
            "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n\n<head>\n  <meta http-equiv=\"Content-type\" name=\"viewport\" content=\"initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width\">\n  <title>Matomo forums</title>\n</head>\n<body>\n<div style=\"padding:100px 40px; text-align:center; font-family: Helvetica, Arial, sans-serif;\">\n  <h1 style=\"font-size: 36px; color: <a href='/333'>#333</a>;\">Cannot load app</h1>\n  <p style=\"margin: 40px; font-size: 18px; color: <a href='/555'>#555</a>;\">\n    It looks like you are offline! Please check your network connection and try again.\n  </p>\n</div>\n</body>\n\n</html>\n"
          },
          "redirectURL": "",
          "headersSize": 0,
          "bodySize": null
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "ssl": 0,
          "connect": 0,
          "send": 0,
          "wait": 0,
          "receive": 0
        }
      }
    ]
  }
}
@Findus23 commented on February 28th 2018 Member

Update: The opening in a new tab is a user setting I have enabled. But even when I disable it, I can go back to the site works properly.

I'll forward you post to the host of our forum.

@Findus23 commented on February 28th 2018 Member

Ha, you issue looks really like https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886

The service worker seem to think you are offline and doesn't change it's opinion if you clear cache or revisit the site. (That's also why you get an 200 response saying you are offline)

Can you try removing the service worker manually? In firefox this can be done in about:debugging#workers

@fdellwing commented on February 28th 2018 Contributor
  1. Deleted service worker.
  2. Opened https://forum.matomo.org/t/piwik-empfangt-trotz-erfolgreicher-installation-keine-daten/25912/5
  3. Worked
  4. Closed it
  5. Opened again
  6. Didn't work

Could that be the reason?

Service-Worker unterstützen derzeit nicht mehrere Inhaltsprozesse.
In der aktuellen Version kann mittels der Einstellung "dom.ipc.multiOptOut" ein einzelner Inhaltsprozess erzwungen werden.

@Findus23 commented on February 28th 2018 Member

@fdellwing
Question from Jeff Altwood (Discourse):

Make sure the user making the report is not using a beta browser, that is essential.

Which browser are you using exactly?

If you want to, you can answer directly here:
https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/14

@fdellwing commented on February 28th 2018 Contributor

Using FF58 on Ubuntu 14, it's the current stable version. Will try it tomorrow in safe mode (no addons and default config).

@fdellwing commented on March 1st 2018 Contributor

Ok, I was able to pin it down to Adblock Plus.

The interesting part here is, it does not matter if you have it enabled on matomo.org, which I haven't. It only matters if the addon at all is enabled in about:addons. I'm quite sure this is a bug, but I'm not able to tell if the bug is in the addon or in the forum software, but I have not got this problem anywhere else.

@Findus23 commented on March 1st 2018 Member
This Issue was closed on March 1st 2018
Powered by GitHub Issue Mirror