SOLVED: Firefox does not display web interface from LAN printer correctly
Firefox fails to display the web UI from my Canon printer properly. It should display as a GUI, but Firefox displays it as a text page. I tried "safe mode" but that did not change anything. The page displays properly in other browsers. Screen shot samples showing a page in Firefox and the same page in Edge is attached.
Sky द्वारा
चुने गए समाधान
Sky said
jscher2000 saidHi Sky, does it make any difference if you try changing the Text Encoding to Unicode while you are on the main page of the site?Afraid not, Text Encoding is greyed out on the html pages. It appears to only work when the code is exposed. I attached a shot of the header fyi.
I guess Firefox is already applying UTF-8 encoding to the main page and that can't be (and doesn't need to be) overridden.
There must be some non-obvious reason that Firefox is discarding most of the style sheet. I think what I would try is to inject the styles myself using the Stylus extension. That's an add-on you can use to inject CSS into most pages (some pages might block it). Since I don't have access to the printer, it's difficult to know for sure what will happen, but here's the process I would try:
(A) In a different tab, install the Stylus extension
https://addons.mozilla.org/firefox/addon/styl-us/
(B) On the Canon page, click the Stylus "S" icon on the toolbar and near the bottom under "Write style for" click the left-most part of the IP address to start a new rule matching that IP.
<center></center>(C) Paste the cleanest version of the style sheet you have into the new rule and
(1) remove the comments with the Asian characters (starts with /* and ends with */) then
(2) click the Save button on the left
Switch back over to the page and see whether injecting the styles in this way makes it readable.
संदर्भ में यह जवाब पढ़ें 👍 1All Replies (20)
Sky said
Firefox fails to display the web UI from my Canon printer properly. It should display as a GUI, but Firefox displays it as a text page. I tried "safe mode" but that did not change anything. The page displays properly in other browsers. Screen shot samples showing a page in Firefox and the same page in Edge is attached.
Looks that some CSS files aren't loaded.
Does the Web Console show messages about blocked content ?
- "3-bar" menu button or Tools -> Web Developer
- https://developer.mozilla.org/en-US/Tools/Web_Console
This is an old printer (discontinued model) that still works well. It is installed on my LAN by hardwire. There is no realistic security risk unless physically accessed, and only immediate family has access. It is failing to properly display the home page before entering any username/password. Even if I set the username/password fields blank (no username/password), the fields themselves still exist. If possible I would prefer to let it work as-designed.
Web Console shows these:
Loading failed for the <script> with source “http://192.168.1.44/include/rui.js”. 192.168.1.44:10:1
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.
Sky द्वारा
Sky said
Web Console shows these:
Loading failed for the <script> with source “http://192.168.1.44/include/rui.js”. 192.168.1.44:10:1
If you try loading it directly, does that file exist?
Could you test in Firefox's Safe Mode? In its Safe Mode, Firefox temporarily deactivates extensions, hardware acceleration, any userChrome.css/userContent.css files, and some other advanced features to help you assess whether these are causing the problem.
If Firefox is not running: Hold down the Shift key when starting Firefox. (On Mac, hold down the option/alt key instead of the Shift key.)
If Firefox is running: You can restart Firefox in Safe Mode using either:
- "3-bar" menu button > "?" Help button > Restart with Add-ons Disabled
- (menu bar) Help menu > Restart with Add-ons Disabled
and OK the restart.
Both scenarios: A small dialog should appear. Click "Start in Safe Mode" (not Refresh).
Any improvement?
Safe Mode showed no change (see original Q)
I don't know how to directly access the (Canon) printer's files to search for that script. The pages do load correctly in I.E. 11.x and Edge, they fail to load at all in Chrome v79.0.3945.130 (Official Build) (64-bit) or Chrome 80.0.3987.122.
ADDITIONAL: I tried disabling the username/password login (not just leaving it blank, but disabling the requirement to use them). That had no effect.
Sky द्वारा
Sky said
I don't know how to directly access the (Canon) printer's files to search for that script.
I meant the URL in the error message. What if you try to load that URL via the address bar?
Does the Console in Chrome's developer tools (F12) give any info on why it won't load the page?
Yes, the URL pointing to the script loads and displays the full script.
It appears Chrome chokes on the certificate or lack thereof. It displays a "not secure" flag preceding the URL, but seems to give no way of bypassing that nor of declaring the "site" secure. It's seemingly a hard lock. F-12 reveals no data, the data windows are blank.
I don't know why Chrome would try to use HTTPS for that address, unless that's a new thing Chrome does. ??
Since the file is confirmed to exist through direct access, I don't think we have enough information to know why it didn't load as a resource to the main page. Could you test with your blockers (Adblocker and DDG Privacy) disabled, at least for that site?
Note that this file is meant:
- http://192.168.1.44/include/rui.js
Are there any CSS files being requested if you check this in the Network Monitor and possibly in the Style Editor ?
- "3-bar" menu button or Tools -> Web Developer
- https://developer.mozilla.org/en-US/Tools/Network_Monitor
I do notice the permissions icon in the screenshot next to the padlock icon. This means that you made changes to default permissions.
What permissions is this about if you click this icon ?
1) Network monitor does not show any CSS sheets being requested 2) Style Editor does not show any CSS sheets being requested 3) "Enhanced Tracking Protection is OFF for this site"
Sky द्वारा
Maybe check the page code in other browsers to see if there are inline CSS rules or whether they get CSS files in case the printer does user agent sniffing.
cor-el said
Maybe check the page code in other browsers to see if there are inline CSS rules or whether they get CSS files in case the printer does user agent sniffing.
Well that's interesting...
I tried opening it again in Chrome and got nothing, literally, but it opens other "locally-odd" pages like my modem and router just fine. Then I went back to Edge > F12 and started unwinding the page elements as suggested. In the head I found this: <link href="std.css" rel="stylesheet" type="text/css" media="all">, so there is a style sheet after all. Edge also notes an Inline style, but that is blank: Inline style { }.
So Chrome breaks the page, Firefox partially renders it, and Edge opens it normally. There seems to be not a single solitary web browser on the market today, or for the past few years, that will reliably open web pages.
I have no idea where to go from here.
Don't you see that link tag in Firefox if you check the page source ?
Can you open the CSS file in Firefox assuming the file is at root level ?
- http://192.168.1.44/std.css
Test the link in Edge to be sure it is correct.
I was looking in the wrong place! I am sorry...
Open in Firefox > F12 > Inspector > open <head> and yes, there it is. Yes, I can open the page in Firefox and yes, Edge tests affirmative offering to open the page in Code Writer, etc.
As to the CSS itself, the following may be a red herring...
My very rusty recall is that a non-standard character, even if escaped, can break things. There is code in the page that seems odd to me as there are several "non-standard" fonts including one character I am unable to determine the key sequence of.
/*--activeã¯Windows環境用Tabフォーカスã€focusã¯MacIE用Tabフォーカス--*/
There are actually three "characters" here, but only these two are displaying: 㯠. The extra character is here: ã#¯ and in Firefox it looks like a vertical rectangle with binary 00 at the top, and 01 at the bottom. Sort of like this:
____
|00| |01|
____
but with no extra space top or bottom and the border is one contiguous rectangle []. Character Map, Notepad, and Code Writer do not render it at all. Word displays it is an empty box. It appears 3x in this line of code, but nowhere else in the CSS.
EDIT In Web Console | Style Editor > the above escaped comment line appears in light grey (a Console API message) and the odd characters appear to be a mix of Traditional & Simplified Chinese and Japanese. Clearly if Firefox truly ignore the escaped sequence and is not broken by unexpected characters, this is not the issue. :-(
Sky द्वारा
fejone4917 said
This was happening with me too, I followed these process Part 1: [hyperlink removed] Part 2 [hyperlink removed]
The links above resolve to example.com, at Iana Reserved Domains.
Sky द्वारा
Hi Sky, if you open the CSS file in its own tab and check Page Info, does it mention an unusual encoding? Either:
- right-click a blank area of the page > View Page Info
- (menu bar) Tools > Page Info
The most common is UTF-8 but windows-1252 should also be fine, as that is something of a default or fallback encoding on a Windows system. Sometimes you get UTF-16 or other exotic encodings that look gibberishy to Firefox. Or perhaps the problem is that the file was saved with an unsual encoding but Firefox is using the fallback encoding. Hmm... in that case the dialog won't tell the whole story.
It's showing windows-1252.
Fwiw, Permissions look fine; Security only shows it's not encrypted, which is expected and as it should be.
Can you open the CSS file as Unicode?
- View -> Text Encoding -> Unicode
cor-el said
Can you open the CSS file as Unicode?
- View -> Text Encoding -> Unicode
I'm sorry but I'm not following. "View"? I can open it using
- F12 > Style Editor > (gear/settings) > Original source; and
- Menu > Web Developer > Web Console > etc.
I'm not seeing any View > text Encoding...
I copied the URL and was able to open it in Code Writer. Being opened directly vs. copy & paste it now displays all of the characters. This comment in the CSS refers to
/*--active Windows Tab focus MacIE Tab--*/
I don't know if Code Writer can save to root on the device, but I can try a ave std.css as: std_bup.css, then modify the std.css removing the errant characters and see if that works.
FAIL at Save As..., CW can't save to the device.
If you tap the Alt key to activate the classic menu bar, that View menu has a Text Encoding fly-out to test which one renders the page correctly. For example, Unicode.
I don't think the menu has entries for some of the more obscure things.