Web App Manifest not parsed by Chrome Dev Tools - progressive-web-apps

I have a manifest.json according to the MDN spec and while it works correctly when browsing the website from a mobile device (add to homescreen popup shows up, theme color and icons load...etc) Chrome Dev Tools is unable to parse it. The same problem persists on Lighthouse (chrome extension).
Has anyone seen a similar issue? I would think that the JSON is invalid however copy-pasting into Web App Validator it is marked correct, but when inputting the URL it giving a parse error:
File isn't valid JSON: SyntaxError: Unexpected token in JSON at position 0

It is probably a BOM character issue in the manifest.json file.
If you have Notepad++ on your machine, try open the file, click menu "Encoding" -> "Encode in UTF8 without BOM" and then save the file.
If you don't have Notepad++, search Google for "Remove BOM character" for your favorite IDE/editor.

Related

How to deeplink a file from macOS app to browser print preview (like sublime text does)?

The functionality I'm after is where Sublime Text opens the browser to the print preview of the file currently edited.
This is the following:
Have a txt file (in sublime).
Select File > Print
Observe that the default browser opens up to the print preview page (tested in firefox and safari)
The urls seem to point to the file being in a temp directory and generated as a html file.
file:///private/var/folders/05/q2p__63n3zx9k3yzcb8f9n0c0000gn/T/tmpbfkdzvmq.html
Note html generation isn't necessary for my use case, remaining as txt is fine.
The answer can be for either swift or objective-c. I'm after how to open the browser to print preview.
I believe the answer involves using Apple Events as mentioned by #Willeke.
These is the information I found that assisted me:
https://applescriptlibrary.files.wordpress.com/2013/11/apple-events-programming-guide.pdf
http://webcache.googleusercontent.com/search?q=cache:B5zOBQgWUoMJ:mirror.informatimago.com/next/developer.apple.com/technotes/tn2002/tn2082.html+&cd=1&hl=en&ct=clnk&gl=ae
https://discussions.apple.com/thread/7743420
In pseudo AppleScript code, it would be something like this:
tell default browser
launch
print document
endtell

Chrome developer tools not displaying full html/js file

I see an error in the console view. I click on the line number, and it opens the HTML file in the sources tab. But that line is not displayed because only the first 11 lines of the HTML file (which is mainly JS) are shown. This is a recurring problem for me. The full file is loaded and successfully parsed and executed by the browser, when I view the file in the browser the full source is there. If I load the page before opening the developer console everything works as expected. What might be happening?
Version 37.0.2062.44 beta-m

TinyMCE/FCKeditor not able to browse for files

I changed some permissions on my server and somehow broke TinyMCE so that it can no longer browse for images and files.
I changed the permissions back to what they were but the issue still persists - when I go to browse for files I am just presented with a blank screen:
Would anyone know how to repair this?
(PS using ModX Evo CMS)
EDIT: what I see on console on the edit resource page (nothing appears when I open the console on the browsing window):
6
Refused to set unsafe header "Connection" index.php:1
Uncaught Error: IndexSizeError: DOM Exception 1 /assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js:1
2
Refused to set unsafe header "Connection" index.php:1
Thanks!
In case you do use standard installation of tinymce i suggest you reinstall tinymce over the files on the server.
Try checking all the file names for anything that might contain special character. A em dash, n dash, possibly left quote ”, right quote etc...
I would do this via ftp to make sure you can see all the files in admin section. Rename any of the files that might have questionable characters and see if that fixes it.

Firefox Tomcat7 Cookie IllegalArgumentException

Tomcat 7.0.30
Firefox 15.0.1
Eclipse 3.7 & 4.2
I have recently installed Tomcat7.0.30 and since then I am having all kinds of problems with Firefox. (for example this one)
Right now I am getting a java.lang.IllegalArgumentException: Control character in cookie value or attribute. exception.
I have a plain html file:
<html>
<head><title>Test</title></head>
<body>Test htm</body>
</html>
This is what Firebug reports:
"NetworkError: 500 Internal Server Error - http://localhost:8080/WSTest"
The character encoding of the plain text document was not declared.
The document will render with garbled text in some browser configurations
if the document contains characters from outside the US-ASCII range.
The character encoding of the file needs to be declared in the
transfer protocol or file needs to use a byte order mark as an encoding signature.
What bothers me is that there are no problems whatsoever in chrome. The page just opens as I would expect it to...
I have tried to google this and the only suggestion I found was to add this:
org.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE=true
org.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true
to the catalina.properties file, but that didn't help.
I'm really loosing my mind here.
Apparently the problem was with my Firefox installation. After exhausting all options and testing with Chrome, Safari, Opera and even IE, which all worked properly, I decided to uninstall Firefox with removing all profile settings and then re-install it again. The new installation works.
p.s. HINT: if you are uninstalling Firefox completely, don't forget to backup your bookmarks and passwords and save the list of your add-ons ;)
bookmarks can be backed up directly from Firefox
passwords can be stored with an add-on called Password Exporter
add-ons I "save" with a screenshot :D

iPhone Safari offline-cache manifest not working correctly

I'm working on a mobile site for the iphone. I've added a cache manifest and loaded it with a list of resources needed for offline capability. The manifest file has the correct content type. You can view the manifest file in the header of this page:
http://www.rvddps.com/apps/sixshot/booking.html
I had a bunch of links to pages but due to my user level i'm only allowed to post one link. You can see the manifest file there and the source code of the page i'm trying to cache.
I've set the correct MIME type on the server, but the cache only seems to work occasionally.. not all the time. I've tried following apples' official caching guidelines as well.
Can anyone point out where i'm going wrong?
Thanks
Daniel
I looked at the manifest file and found 'Â' characters in some of the blank lines. What text editor are you using? Make sure you use the proper encoding and line ending types.