question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bugfix: docker iframe adds /data/ to url incorrectly

See original GitHub issue

Describe the bug

Using the docker-compose.yml instructions, adding a URL works fine. When accessing that URL I get a 404 within the iframe.

Steps to reproduce

  1. Start docker-compose up
  2. Add URL
  3. Click on the URL. I get the top bar, but the iframe is a 404

Screenshots or log output

It looks like the iframe is trying to go to http://server/data/archive/1600957105.659589/site/index.html when the data folder doesn’t exist as a web entity.

Browsing to http://server/archive/1600957105.659589/site/index.html works. (note: without the /data/ folder)

How can I get the iframe working correctly?

image

Software versions

Latest docker-compose.yml

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cdvv7788commented, Sep 25, 2020

Yes, it is added in there. However, a trailing slash should not (ideally) break anything at all. I will remove it from that line, but I will leave https://github.com/pirate/ArchiveBox/issues/487 open to find a more permanent solution. Thanks!

1reaction
poblabscommented, Sep 25, 2020

@cdvv7788 It failed.

docker build . -t archivebox --no-cache

Step 20/29 : WORKDIR "$CODE_DIR"
 ---> Running in e06219be686e
Removing intermediate container e06219be686e
 ---> 1442435435af
Step 21/29 : ADD . "$CODE_DIR"
 ---> 254a0d4fbc47
Step 22/29 : RUN pip install -e .
 ---> Running in 49333e96986c
Obtaining file:///app
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/app/setup.py'"'"'; __file__='"'"'/app/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fstf2f7j
         cwd: /app/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/app/setup.py", line 17, in <module>
        VERSION = json.loads((PYTHON_DIR / "package.json").read_text().strip())['version']
      File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
        return _default_decoder.decode(s)
      File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The command '/bin/sh -c pip install -e .' returned a non-zero code: 1
Read more comments on GitHub >

github_iconTop Results From Across the Web

WGET paths are not working as expected with trailing slashes ...
Steps to reproduce Run archivebox add https://some_url Start server with ... Bugfix: docker iframe adds /data/ to url incorrectly #483.
Read more >
iframe refuses to display - html - Stack Overflow
The reason for the error is that the host server for https://cw.na1.hgncloud.com has provided some HTTP headers to protect the document. One of...
Read more >
A.6 Common iframe errors - Hands-On Data Visualization
6: Can you spot three common problems in this incorrect iframe code? All three problems are corrected here, which causes the iframe to...
Read more >
Changelog - Cypress Documentation
Bugfixes : Fixed an issue with the cy.session command where it now recollects the session data after validation is successful to correctly store...
Read more >
title: Changelog — Auspice documentation
version 2.32.1 - 2021/11/11 . Fix URL parsing to allow the string “narratives” to be in a dataset without it being interpreted...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found