Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #38456

    khael
    Participant

    Hello guys,
    i install last firmware version (http://www.raysfiles.com/ospi/ospi2.img.7z). Initially it works correctly but now if i open http://ospi_ip:8080/ i have a blank page.
    this is the error.log on /var/log/apache2/

    [Sun May 31 21:49:44 2015] [notice] Apache/2.2.22 (Debian) configured — resuming normal operations
    [Tue Jun 16 12:08:32 2015] [error] [client 10.1.1.219] File does not exist: /var/www/favicon.ico, referer: http://10.1.1.220/
    [Mon Jun 01 03:49:41 2015] [notice] Apache/2.2.22 (Debian) configured — resuming normal operations
    [Tue Jun 16 19:05:11 2015] [notice] caught SIGTERM, shutting down
    [Tue Jun 16 19:05:37 2015] [notice] Apache/2.2.22 (Debian) configured — resuming normal operations

    this is the source page of blank page:

    <!DOCTYPE html>
    <html>
    <head>
    <meta name=”viewport” content=”width=device-width,initial-scale=1.0,minimum-scale=1.0,user-scalable=no”>
    </head>
    <body>
    <script>var ver=214,ipas=0;</script>
    <script src=”/home.js”></script>
    </body>
    </html>

    on /var/www/ there is only the index.html file

    thanks in advance

    Khael

    #38468

    Samer
    Keymaster

    Unless you are hosting the UI files on the Raspberry Pi as well, Apache is not used. Also, I don’t see any errors in the log output you pasted. This is also why /var/www is empty. The firmware actually launches it’s own web server for the data and uses the Internet for the UI files. Therefore, if you don’t have a working Internet connection, this could be the cause of the blank page.

    Can you try an application or browser extension? We have extensions for Chrome and Firefox and apps for OS X, iOS, Android, Blackberry 10, Windows Phone 8 and Amazon Fire. The apps do NOT need an Internet connection and have all the UI assets they need bundled inside.

    Also, if you are interested in copying the UI files to the Raspberry Pi and using Apache to host them we have a guide for this: https://opensprinkler.freshdesk.com/support/solutions/articles/5000164006-using-a-different-server-for-ui-assets. In the future, we will consider preconfiguring the SD card for the OSPi to automatically do this however the reason we don’t the UI would no longer get updated automatically, like it does when hosted on the Internet.

    Also, none of this helps, can you open the Developer Tools (in Chrome right click and push “Inspect Element”) and navigate to the “Console” tab? Here you will see any errors listed in red. If there are any, can you please share them.

    Thank you!

    #38774

    jdent
    Participant

    I’m trying to host the UI files locally on my RPi based on the document referenced. The/su form in the web GUI says “If local on uSD card, use ./”. I downloaded the UI files from:

    http://rayshobby.net/scripts/sprinklers/UI.zip

    Where exactly do I put the files to host them from the uSD instead of Apache? Copy the entire folder, or just the files within the UI folder?

    #38775

    Samer
    Keymaster

    That bit of text is not really designed for the OSPi but rather the Arduino device (which no longer supports hosting the UI assets from the SD card).

    You are welcome to follow the same guide: https://opensprinkler.freshdesk.com/support/solutions/articles/5000164006-using-a-different-server-for-ui-assets to setup the Apache hosting. Specifically, it will be option 2 of that document.

    #38966

    jdent
    Participant

    I got Apache both serving up the UI files, as well as acting as a reverse proxy https->http for the main GUI, and iptables to block http. The CORS stuff isn’t needed because the UI assets are being served up by the same server as OpenSprinker app.

    However… Even pointing to your server for the UI assets with Firefox I am seeing the same symptoms as Khael. Safari works fine, but not Firefox (currently on 34.0.5). The page just sticks in a “Loading” state. I’ve attached a screen shot of the Network tab. Note that this is not using my local https proxy or ui assets – I’m going straight to port 8080 and your server for assets.

    Pulling up Web Developer->Inspector, turning on all logging levels, this is what I see in the Console tab:

    GET http://sprinkler:8080/ [HTTP/1.1 200 OK 7ms]
    reflow: 0.04ms
    reflow: 0.36ms
    Expected ‘none’ or URL but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. sprinkler:8080:1
    The character encoding of the HTML 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 page must be declared in the document or in the transfer protocol. sprinkler:8080
    reflow: 1.43ms
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1
    Expected ‘none’ or URL but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1
    Unknown property ‘user-select’. Declaration dropped. app.cgz:1
    Error in parsing value for ‘-moz-perspective’. Declaration dropped. app.cgz:1
    Error in parsing value for ‘perspective’. Declaration dropped. app.cgz:1
    Error in parsing value for ‘-moz-transform-origin’. Declaration dropped. app.cgz:1
    Error in parsing value for ‘transform-origin’. Declaration dropped. app.cgz:1
    Expected ‘none’ or URL but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1
    Unknown property ‘appearance’. Declaration dropped. app.cgz:1
    Unknown pseudo-class or pseudo-element ‘-webkit-inner-spin-button’. Ruleset ignored due to bad selector. app.cgz:1
    Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’. Ruleset ignored due to bad selector. app.cgz:1
    Unknown pseudo-class or pseudo-element ‘-webkit-outer-spin-button’. Ruleset ignored due to bad selector. app.cgz:1
    Unknown pseudo-class or pseudo-element ‘-ms-clear’. Ruleset ignored due to bad selector. app.cgz:1
    Error in parsing value for ‘margin’. Declaration dropped. app.cgz:1
    SecurityError: The operation is insecure. app.jgz:8
    reflow: 1.25ms

    #38969

    Samer
    Keymaster

    I am using Firefox 38 and having no issues. Can you please update and retest?

    #38978

    jdent
    Participant

    Very strange. Updating to the latest Firefox (39) didn’t help. However, if I log in to another user on my Mac with a default config, Firefox works just fine. Must be something in my Profile. When I bring up the inspector/console, under my user I currently see:

    GET https://sprinkler:8443/ [HTTP/1.1 200 OK 25ms]
    This site makes use of a SHA-1 Certificate; it’s recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] sprinkler:8443
    GET https://ui.opensprinkler.com/js/home.js [HTTP/1.1 200 OK 49ms]
    GET https://ui.opensprinkler.com/css/app.cgz [HTTP/1.1 200 OK 430ms]
    GET https://ui.opensprinkler.com/js/app.jgz [HTTP/1.1 200 OK 483ms]
    GET https://ui.opensprinkler.com/css/lato.fnt [HTTP/1.1 200 OK 100ms]
    SecurityError: The operation is insecure. app.jgz:8:0

    In the user that is working, the ‘insecure’ error doesn’t appear:

    GET https://sprinkler:8443/ [HTTP/1.1 200 OK 122ms]
    This site makes use of a SHA-1 Certificate; it’s recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] sprinkler:8443
    GET https://ui.opensprinkler.com/js/home.js [HTTP/1.1 200 OK 179ms]
    GET https://ui.opensprinkler.com/css/app.cgz [HTTP/1.1 200 OK 373ms]
    GET https://ui.opensprinkler.com/js/app.jgz [HTTP/1.1 200 OK 525ms]
    GET https://ui.opensprinkler.com/css/lato.fnt [HTTP/1.1 200 OK 306ms]

    I did add the CORS line to my web server when loading ui assets from my server. I was seeing some errors in the console, even though I didn’t see any visible problems.

    #38979

    Samer
    Keymaster

    Right, unfortunately, your Firefox instance is choosing to throw a security error. I am not sure how to account for the difference however one thing you can try is to change the app.jgz file into the uncompressed app file that is not minified. The reason is, Firefox should give you the specific line number generating the error. Right now it says line 8 because the code is minified and each file represents one line.

    Please note, the jgz file extension will tell Apache to send a GZIP header so if the file is not already GZipped then it will cause a parsing error. So either, comment this line out in your web server config or gzip the file. You could also just edit home.js to use .js instead of .jgz for the “app” file.

    I would do this debugging step myself but I do not receive the error begin with so it won’t help.

    Thanks!

    #38995

    jdent
    Participant

    I used unminify.com, then regzipped app.jgz, and now the console say:

    SecurityError: The operation is insecure. app.jgz:6143:0

    Bringing it up under vi, line 6143 is:

    else “string” == typeof a && (d[a] = localStorage.getItem(a));

    (fourth line from the bottom, below). Code around that area is:

    var isIEMobile = /IEMobile/.test(navigator.userAgent),
    isAndroid = /Android|\bSilk\b/.test(navigator.userAgent),
    isiOS = /iP(ad|hone|od)/.test(navigator.userAgent),
    isFireFoxOS = /^.*?\Mobile\b.*?\Firefox\b.*?$/m.test(navigator.userAgent),
    isFireFox = /Firefox/.test(navigator.userAgent),
    isWinApp = /MSAppHost/.test(navigator.userAgent),
    isBB10 = /BB10/.test(navigator.userAgent),
    isOSXApp = isOSXApp || !1,
    isChromeApp = “object” == typeof chrome && “object” == typeof chrome.storage,
    isFileCapable = !(isiOS || isAndroid || isIEMobile || isOSXApp || isFireFoxOS || isWinApp || isBB10 || !window.FileReader),
    isTouchCapable = “ontouchstart” in window || “onmsgesturechange” in window,
    storage = {
    get: function(a, b) {
    if (b = b || function() {}, isChromeApp) chrome.storage.local.get(a, b);
    else {
    var c, d = {};
    if (“object” == typeof a)
    for (c in a) a.hasOwnProperty(c) && (d[a[c]] = localStorage.getItem(a[c]));
    else “string” == typeof a && (d[a] = localStorage.getItem(a));
    b(d)
    }
    },

    #38996

    Samer
    Keymaster

    So the error it’s throwing is against my use of localStorage, which is perfectly normal to use. I am doing some searching now however my initial results indicate this is a bug in Firefox since version 29.

    Update: It is also possible your browser has an addon or setting preventing localStorage.

    #38999

    jdent
    Participant

    Been trying to isolate what setting might do this. My first thought was dom.storage.enabled. Nope, that’s set to the default of true.

    If found this post:

    http://superuser.com/questions/629525/how-to-control-websites-use-of-localstorage-in-firefox

    Which says:

    “disabling cookies disables storage, unless the site is on the whitelist

    if the cookie preferences are set to prompt, this is treated the same as reject cookies”

    I have my Firefox cookie preferences set to “Accept cookies from 3rd party sites, keep until ‘ask me every time'”. I changed that to until ‘I close firefox’. and it starts working.

    So… Preferences -> Privacy -> Exceptions… -> In the “Address of website:” box, add my OSPi address and click “Allow” to always accept cookies from OSPi, which apparently also allows offline storage. Type in my OSPi URL and – It works!

    #39000

    Samer
    Keymaster

    Glad you were able to figure it out and thank you for posting back here for anyone else who might be having the issue. It is quite odd that cookies are tied to explicitly with local storage but I understand how they are similar.

    #39002

    jdent
    Participant

    I’m thinking if you just stored a cookie, that would solve the problem – as long as the user didn’t click “Deny”? For those that have prompting set, that would add the server to the white list, even if it was just Allow for Session.

    #39003

    Samer
    Keymaster

    So, you are suggesting I have to add a dummy cookie for Firefox to correctly allow local storage? I really think this should instead be submitted as a bug to Mozilla (and it seems it already has been a few times).

    I am not completely dismissing finding a fix for this but I admit this seems like a large hack and would prefer a better method. I will do some research with this new information.

    Thank you!

    #39022

    jdent
    Participant

    I don’t disagree – absolutely would be a hack. Just looking for options to avoid others hitting the problem if you can’t find a proper solution or get Mozilla to fix.

    #39032

    jdent
    Participant

    A related question that’s got me stumped… When I select Main Menu -> Weather Diagnostics, the weather window pops up, but is completely blank, both Safari and Firefox.

    If I bring up Inspect Element, looking at each element of the pop-up window all of the data appears to be there. Yet it doesn’t display.

    If I connect directly to http port 8080 instead of https port 8443, then the text in the window appears. I have found no other windows that are not properly displaying when using my reverse https->http proxy. This is all javascript executing on the browser, right? So why would http vs https or the proxy create an issue? Any ideas how to solve?

    Attached is what I see, including the Inspector

    #39034

    Samer
    Keymaster

    I can actually see the text in the screenshot you sent in the popup however it is white on white so therefor not very visible.

    This is very odd that it is related to a ProxyPass however is it possible a CSS is not loading properly? Do you see any errors in the network tab or the console tab?

    Can you identify what aberrant CSS is added to make the text white? If so, I can try to identify why it’s being incorrectly applied.

    Thanks!

    #39035

    jdent
    Participant

    I don’t see any errors related to CSS. In Safari, when the main page loads, I get this:

    [Warning] Unexpected CSS token: : (app.cgz, line 1)
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (releases, line 0)

    But no additional errors when I try to do Weather Diagnostics.

    (full message refuses to copy/paste, so attached screen shot). I also get that whether http or https.

    Web coding isn’t my forte, so I’m afraid I don’t know how to go about figuring out what CSS is making the text white. If you can tell me how to track that down, I’ll give it a try. The only style sheet I can see in the Inspector is app.cgz. It shows 6119 lines.

    In Firefox with Inspector debugging turned way up, I see:

    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:128637
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:128783
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:128934
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:129752
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:130046
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:134285
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:137941
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:138074
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:138534
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:139842
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:139983
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:140473
    Unknown property ‘user-select’. Declaration dropped. app.cgz:1:142098
    Error in parsing value for ‘-moz-perspective’. Declaration dropped. app.cgz:1:154569
    Error in parsing value for ‘perspective’. Declaration dropped. app.cgz:1:154586
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:158258
    Error in parsing value for ‘-moz-transform-origin’. Declaration dropped. app.cgz:1:158435
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:158455
    Error in parsing value for ‘transform-origin’. Declaration dropped. app.cgz:1:158478
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:164988
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:167975
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:173625
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:174503
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:174581
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:174637
    Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:178666
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:180195
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:180392
    Unknown property ‘appearance’. Declaration dropped. app.cgz:1:189241
    Unknown pseudo-class or pseudo-element ‘-webkit-inner-spin-button’. Ruleset ignored due to bad selector. app.cgz:1:189347
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:194248
    Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’. Ruleset ignored due to bad selector. app.cgz:1:194734
    Unknown pseudo-class or pseudo-element ‘-webkit-outer-spin-button’. Ruleset ignored due to bad selector. app.cgz:1:194890
    Unknown pseudo-class or pseudo-element ‘-ms-clear’. Ruleset ignored due to bad selector. app.cgz:1:194949
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:195099
    Unknown property ‘user-select’. Declaration dropped. app.cgz:1:195823
    Expected ‘none’, URL, or filter function but found ‘Alpha(‘. Error in parsing value for ‘filter’. Declaration dropped. app.cgz:1:196146
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:200844
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:203986
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:204148
    Unknown property ‘-moz-box-shadow’. Declaration dropped. app.cgz:1:204323
    Error in parsing value for ‘margin’. Declaration dropped. app.cgz:1:214135
    Unknown property ‘user-select’. Declaration dropped. app.cgz:1:217784
    This site makes use of a SHA-1 Certificate; it’s recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More] index.htm
    Error in parsing value for ‘pointer-events’. Declaration dropped. sprinkler:8443

    #39295

    jdent
    Participant

    Any ideas on how I can resolve the problem and get the text back to black?

    #39296

    Samer
    Keymaster

    I just tried on Safari and Firefox without this issue. I suspect you might have a plugin that is modifying CSS on the page. You would be surprised how many plugins do this (including ad blockers). I would try a fresh instance of the browser to rule out those kinds of issues. Seeing as I cannot reproduce it I would need something more than just the parsing log from Firefox.

    For example, in the web tools you will see a tab on the top right labeled “Styles”. With the div containing the text selected, you will be able to see which CSS properties are being applied to that element. Therefore, you should be able to find what is making the text white in this instance. If you can maybe find this or attach screenshots, that would be helpful. Please note the elements will inherit the properties from their parent elements if they are not explicitly defined which means you will have to traverse outward until you find the class causing the issue.

    Thank you!

    #39319

    jdent
    Participant

    Did some digging around in the Inspector. See attached screen shots. The first is the good vs bad computed, which clearly shows the problem (highlighted). The second screen shot shows the only obvious difference I could find – there are two “Table” entries in the bad one, but only one in the good one. Both say User Agent Stylesheeet. The third is a full screen shot of the window.

    The problem is only occurring when I go through the https->http proxy. Something is getting mistranslated? But this is the only window I have problems with.

    #39325

    Samer
    Keymaster

    Although your first screenshot does help expose the issue it doesn’t tell us the cause. The problem is you selected “Computed” instead of rules which will show us what rules are influencing the final or computed style. Can you tell me which element was selected to show that difference in screenshot 1? You can use screenshot 3 as a reference if that helps. If the element under rules doesn’t show the difference you will have to traverse the tree upward until you find the rule difference.

    Hopefully that exposes the issue otherwise is it possible to let connect to your device with a temporarily different password? If so, you can email me the information and we can proceed from there in order to allow me to see the issue and possibly fix it.

    Thanks!

    #39328

    jdent
    Participant

    > Although your first screenshot does help expose the issue it doesn’t tell us the cause.

    Agreed. That was intentional just to show what it was displaying. I started there to see what I was looking for. Screen shots 2 and 3 have “Rules” selected.

    In screen shot 3, the td line highlighted in grey is the selected line (Current % Watering). I see the same thing walking all the way up to the “table” tag. If I go above “table” tag, it changes.

    My OSPi is not Internet exposed. It’s just hooked up on my internal network. At some point I may throw it in one of my DMZ’s where I can put a static NAT, but haven’t done that yet. Trying to finish up my LCD display program right now.

    Forgot to mention that I did try it on a clean browser as you requested, with the same results.

    I’m not finding any way to export the full Console/Rules page I’m looking at.

    I did do a search for “http” in the main console pane looking for a URL that didn’t resolve, in case there was a resource not loading. All that showed up was:

    <base href=”https://sprinkler:8443/#sprinklers”&gt; (This is the https->http proxy port)
    <link rel=”stylesheet” href=”https://sprinkler/css/app.cgz”&gt;
    <link rel=”shortcut icon” href=”https://sprinkler/img/favicon.ico”&gt;
    <script src=”https://sprinkler/js/app.jgz”></script&gt;
    <link rel=”apple-touch-icon” href=”https://sprinkler/res/ios-web/icons/icon.png”&gt;
    <link rel=”apple-touch-startup-image” href=”https://sprinkler/res/ios-web/screens/startup.png”&gt;
    Help & Support

    Everything looks right in these URL’s as far as I can tell. All are valid and return results. If I input the css URL into Safari (or firefox), it loads. I did have a problem when testing with a clean browser that I got the blank page instead of a login page again. It was because the cert is self signed and so it failed accessing the app.jgz file. I manually entered the URL, said trust the cert, and that issue was gone.

    #45065

    jdent
    Participant

    Been a while, and thought I’d make another run at this. Never did figure out why the Weather Diagnostics had white text, making it invisible. But, I just got it to work using haproxy to provide the SSL reverse proxy instead of apache, and haproxy is much easier to deal with. “apt-get haproxy” installs 1.4.x that doesn’t support SSL. So I built the current 1.7.1 from source. Seems to work perfectly, and the Weather Diagnostics screen is now visible.

Viewing 24 posts - 1 through 24 (of 24 total)
  • You must be logged in to reply to this topic.