Javascript

epiz_30828192
https://fulldive.great-site.net/

Good day, I’m trying to test a PWA on your service everything works fine except about the manifest:

Browser console says: Manifest: Line: 1, column: 1, Syntax error.

So I checked the Network response:

<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("a5a36fb9d3b901ce41be58629dfa8850");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="https://fulldive.great-site.net/manifest.json?i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>

To linke it I use this tag:

<link rel="manifest" href="https://fulldive.great-site.net/manifest.json">

That’s even more strange because just next to this tag, I source different others (CSS, etc…) and everything works correctly.

And it was working well on local and public server when testing.

Could you please help me with this?

Sorry some code missing, I add it here:

To link it I use this tag:

<link rel="manifest" href="https://fulldive.great-site.net/manifest.json">

Since you did not write clearly or I did not understand properly, here’s my best guess.

2 Likes

To build a progressive web app, you need a manifest.json file. This is a simple text file with a .json extension.

If you created the file and uploaded correctly, it should be accessible through any method in the browser (eg. script tag, XHR, etc).

I see you are trying to share some code. In order to share the code, you must wrap it in 3 tildes (~) so Markdown doesn’t render it.

And the error you are getting is most likely because your browser is not running JavaScript on that page or at all. And the guide jaikrishna posted tells you that you must access your site from a browser that supports JavaScript (and cookies). If this requirement is not met, your site won’t work.

3 Likes

“I see you are trying to share some code. In order to share the code, you must wrap it in 3 tildes (~) so Markdown doesn’t render it.” => thank you, I tried with the 3/4 indents from the message editor but I couldn’t.

So, to link it I use this tag:

<link rel="manifest" href="<?php echo $domain; ?>/manifest.json" />

Where $domain is my host name (I can access it from the link in web browser).

  • I’ts 100% sure my manifest.json file is OK, I verified it already with Lighthouse on another server and I already downloaded the app, but this is not really related.
  • I’m using a browser who supports Javascript, this is as well 100% sure (for testing I use latest Opera + latest Chrome - Win 10 and my phone browsers so 4 web browsers to test)

I quess regarding my project, there is nothing to do with file sharing, API hosting, database hosting or background tasks/tools, as this is a classic website with WebApp declaration (service worker, images, manifest…).

Interesting. I don’t know why it doesn’t work.

No errors are logged in the console about your manifest when using Firefox.

I don’t know what to tell you, because I don’t have much experience with PWAs.

1 Like

Ok, I’ll wait for a moderator’ feedback or somebody experienced with this.

Indeed yes that’s very strange because the error appears in the Chrome console, but not in my Opera one (but the app is still not validated).

Hello @PLP5621!

I edited your posts so your code correctly shows (Feel free to take a look @wackyblackie).

@wackyblackie probably has more experience in the area of PWA apps than I do, but I’ll give it my best shot.

Just to clarify, you are saying that this works on every browser except Opera? Does it happen to work on a different computer with Opera?

Please let me know if you have any questions!

From what I can see, it looks like manifest is not widely supported yet. It appears it is NOT supported in Chrome, Edge, or Opera, but is fully supported on most mobile browsers (excluding Safari).

I am not overly experienced in the PWA area, but from what I do know, I believe your PWA may have to move to another host, either premium or some static host like GitHub Pages, because neither of these have the security system that is implemented here.

2 Likes

@Greenreader9 my project was working on all my browsers / phones browsers, and now not anymore since I uploaded on infinityfree, so I don’t think so the issue is coming from a set up. Here I meant: it seems some browsers do not print the error in the console.

@wackyblackie as just said here, it was fully supported on all my browsers, but as soon as I uploaded it, it started to bug (manifest not fetched).

“your PWA may have to move to another host, either premium or some static host like GitHub Pages, because neither of these have the security system that is implemented here” => I’ll try this, but already hosting a database on an other server, it means I’ll have this kind of architecture:

webApp server <=> website server <=> database

And this will be a bit weird to handle (regarding security, accesses from cross-origin, etc…)

That’s why I suggested this:

Because of the security system:

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.