Topic: Config file not found

I am using Juicebox Lite.
I am testing it locally on my macOSMojave.
I am embedding it into an html file.

The index.html file does not display locally on Google Chrome or Safari.
The index.html file does display locally in Firefox.
But when I try to view my website page locally in Firefox, it displays the following error message "Config file not found."

My Juicebox folder is called "gallery" and I am storing it outside of the folder where the website page is located.
Location of website page: "../navbar/gallery.html"
Location of gallery: "../gallery"

I am using the recommended baseURL embed code but it is not working.

            <!--START JUICEBOX EMBED-->
                <script src="../gallery/jbcore/juicebox.js"></script>
                <script>
                  new juicebox({
                    baseUrl: '../gallery/',
                    containerId: 'juicebox-container',
                    galleryWidth: '610',
                    galleryHeight: '555',
                    backgroundColor: '#222222'});
                </script>
                <div id="juicebox-container"></div>
            <!--END JUICEBOX EMBED-->

Can you please advise if this is a problem with my code, or if this is a problem with the browser?
Because I have followed your instructions to a T, and I have double, triple-checked my pathing and it is correct.
So I don't understand why Firefox keeps telling me "Config file not found."
And I don't understand why the index.html file displays perfectly fine, but not the code that is embedded in my website.
The index.html file is located in the gallery folder that I'm trying to route the baseURL to.
So if Firefox can display the index.html, it should be able to find the XML file too.

Thanks in advance for your help.

Post's attachments

Location of config file.png
Location of config file.png 92.44 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Config file not found

Also I have more photo examples I can upload to show you, but this forum is only allowing me to upload one.
Let me know if there's an email where I can send you the rest of my examples. Thanks.

Re: Config file not found

I just tried the code for embedding using iframe and it worked.

<iframe src="../gallery/index.html" width="610" height="555" frameborder="0" scrolling="no"></iframe>

Pathway is still the same. I don't understand why it won't work the other way as well. I would prefer to use the recommended way. Please help. Thanks.

Re: Config file not found

But when I try to view my website page locally in Firefox, it displays the following error message "Config file not found."

Unfortunately, very recently, Firefox 68.0 (released on 9 July 2019) introduced a new security restriction which blocks the loading of Juicebox galleries locally (from your computer's hard drive). (There is no problem once the gallery has been uploaded to a web server.)

Here is the relevant entry from the Firefox 68.0 Release Notes: https://www.mozilla.org/en-US/firefox/6 … easenotes/

Local files can no longer access other files in the same directory.

It's an unfortunate turn of events but, thankfully, not an insurmountable problem as there is a workaround.

Here are the steps required to relax this security restriction:
(1) Enter about:config in your Firefox browser's address bar.
(2) Click past the warning via the "I accept the risk!" button.
(3) Enter privacy.file_unique_origin in the search bar.
(4) Double-click the Preference Name to change the Value from 'true' to 'false'.

***Please do so at your own risk*** (although this should be no more of a risk than running the previous version of Firefox (67.0.4)).

I hope this helps.

Re: Config file not found

Hi Steven. I just tried your solution, but privacy.file_unique_origin does not exist.

Re: Config file not found

Please double-check your version of Firefox and, assuming you are running Firefox 68.0 (the version which introduced the security restriction causing the problem), please try the instructions again.
The privacy.file_unique_origin preference does exist in my own Firefox 68.0 browser and the solution I posted worked for myself and another user in this forum thread.
Please also see the screenshot attached to this post which shows the privacy.file_unique_origin preference in the about:config section of my own Firefox browser.

Post's attachments

Screenshot.png
Screenshot.png 14.13 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Config file not found

Thanks Steven. Looks like my computer did not have the latest version installed. I can see privacy.file_unique_origin now. I will try this solution today and let you know how it goes.

Re: Config file not found

That's strange. If you did not have the latest version of Firefox (68.0) installed, then you should not have encountered the problem. The problem with viewing galleries locally in Firefox only started with Firefox 68.0 when they introduced the new security restriction.
Please try my suggestion anway and let me know how you get on. Thanks!

Re: Config file not found

Hi Steven. I changed it from True to False and it's still not working for me. I guess I'll just have to wait until the site is live and hope it works.

Just to summarize what happened:
-- On the old version of Firefox for 2011 Macbook Pro running OS Mojave, only the iframe solution works.
-- On the new version of Firefox for 2011 Macbook Pro running OS Mojave, none of the solutions work.

Re: Config file not found

Thank you for the update.
Looking back over your posts, I have now been able to replicate the problem myself.
The issue seems to be with using ../ in your baseUrl.
Firefox does not seem to like loading galleries locally (even after setting privacy.file_unique_origin to false) if you use ../ in your baseUrl to go back a level in your directory structure.
You can still use a relative baseUrl and view your galleries locally in Firefox but you would need to change your directory structure to do so, for example:

baseUrl="galleries/gallery001/",

The problem seems to specifically be with the use of ../ in the baseUrl. There seems to be no problem with using ../ in the path to the 'juicebox.js' file.
Oddly enough, you can view galleries which use ../ in the baseUrl locally in Edge (Windows) and most likely also in Safari (Mac) as long as you select 'Disable Local File Restrictions' from the 'Develop' menu first (details in this forum post).
I have notified the developers of this but there's probably very little that can be done from within Juicebox to affect core browser functionality.
At least, knowing the problem, you should be able to work around it (by changing your directory structure and ensuring that you do not need to go backwards to reach the gallery folder via the baseUrl).
I hope this helps.

Re: Config file not found

Hi Steven. I just wanted to provide an update that the website I created is live now and the recommended baseURL embed code is working just the way you said it would. So thanks very much for all of your help.

Re: Config file not found

You're welcome!
I'm glad to hear that you've got everything working. Thank you very much for letting me know. It's most appreciated.

Incidentally, I've notified the developers of both issues above: the inability to view galleries locally in Firefox 68 and the strange problem regarding the use of ../ in the baseUrl (again, locally in Firefox).
I'm not sure what, if anything, can be done from within Juicebox to counter either of these issues (I expect nothing can be done with regard to the former) but at least bug reports have been filed and we have workarounds in the meantime.

Re: Config file not found

ah thanks! "also in Safari (Mac) as long as you select 'Disable Local File Restrictions' from the 'Develop' menu first.." that helped me.. now just need to embed it into a local website to make sure it works there.

Re: Config file not found

@adec

ah thanks!

You're welcome! I'm glad this thread has helped you out.

now just need to embed it into a local website to make sure it works there.

I hope all goes well. Just let me know if you run into any difficulties and I'll do my best to help you out.
For reference, the Embedding Guide is here.

15 (edited by adec 2019-09-21 14:55:16)

Re: Config file not found

Thanks Steven, I'll keep playing around with the various options. Using the simple embed code works fine if I add it to the index.html file, unfortunately with this site, all the content is written in the index.js file which is called by index.html.

I don't really want to resort to using frames, so will keep playing a bit more :)

*update yeah with an iframe it works.. even on the same server, I just renamed index.html to indexgallery.html

Re: Config file not found

There's nothing wrong with using an iframe but there are some drawbacks to doing so (which are noted here... scroll down to "2) Using an iframe") so I'd always recommend embedding directly into a web page (following either the regular embedding instructions or the baseUrl embedding instructions) where possible.

If you run into any difficulties, then perhaps you could let me know a little more about how you are trying to embed your gallery (maybe an example would help me to understand your scenario better) and I'll try to help further.

Re: Config file not found

I can't embed directly into the webpage, as I'm not adding content into index.html Adding it into the index.js file just doesn't work .. but that not your fault.. its thegrid.io to blame :)

I just uploaded the partial site to a dummy url so you can see that the gallery does work ok as an iframe.. I just did it really quickly, I haven't played with any settings yet... https://imnotinvisible.org

Re: Config file not found

As long as you are getting on well within the limitations imposed by your web hosting account, that's great!