Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images and icons not showing p.2 #326

Open
asapcal opened this issue May 7, 2024 · 4 comments
Open

Images and icons not showing p.2 #326

asapcal opened this issue May 7, 2024 · 4 comments
Assignees
Labels
bug dx Developer experience working with onetimesecret ops Operational issues question

Comments

@asapcal
Copy link

asapcal commented May 7, 2024

Hello, I continue to face the problem reported in #261:
image

and when I remove the volume block in docker-compose.yaml, solution proposed in #261 , I get the following error:
image

There's something I haven't noticed here yet, could anyone help me with this? Thank you very much in advance

@delano delano self-assigned this May 7, 2024
@delano delano added bug question ops Operational issues dx Developer experience working with onetimesecret labels May 7, 2024
@delano
Copy link
Collaborator

delano commented May 7, 2024

Sorry to hear about the trouble. A couple questions:

  1. Do you know which version you're running? Or are you using the latest release (v0.13.0-RC6) or the official docker images?
  2. Are you running a web proxy like nginx or caddy "in front" of the onetime-app? e.g. for HTTPS
  3. Can you open the homepage and then take a screenshot of the Developer Tools in your browser? Specifically the network tab. Here are some instructions to follow if you need a hand: https://requestly.com/blog/chrome-developer-tools-network-tab/#:~:text=So%2C%20in%20a%20new%20window,button%20and%20click%20on%20it.

Updating to v0.13.0-RC6

If you're not already running the latest release or are using an older version of the docker compose config, here's something to try:

  1. Get the docker-compose.yml file from here and comment out the /app volume on line 61: https://github.com/onetimesecret/onetimesecret/blob/v0.13.0-RC6/docker-compose.yml#L61

  2. You can also update the onetime-app to use the official docker image by replacing lines 33-35 with simply image: onetimesecret/onetimesecret:latest

  3. Copy the .env.example file to .env. If you already have a .env file, note that the environment variable names have been shorted with this release (see the release notes for the details.

@asapcal
Copy link
Author

asapcal commented May 8, 2024

Hi Delano, thank you very much for your feedback. Regarding point 2 "Are you running a web proxy like nginx or caddy "in front" of the onetime-app? e.g. for HTTPS". I'm not simply applying the command: docker compose up in my local environment and making queries using my browser. About the version I'm using for testing, it's the one in the develop branch, I changed it to v0.13.0-RC6 and made the changes suggested first in lines 33-35, changing to the official image and then commenting on line 61 and not I had no success, here are the screenshots:

image


image


Below are the command logs: docker compose up,

➜ onetimesecret git:(v0.13.0-RC6) ✗ docker compose up
WARN[0000] /home/testapps/onetimesecret/docker-compose.yml: version is obsolete
[+] Running 1/0
✔ Container onetime-redis Created 0.0s
⠋ Container onetime-app Recreated 0.1s
Attaching to onetime-app, onetime-redis
onetime-redis | 1:C 08 May 2024 10:31:27.727 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
onetime-redis | 1:C 08 May 2024 10:31:27.727 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
onetime-redis | 1:C 08 May 2024 10:31:27.727 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
onetime-redis | 1:M 08 May 2024 10:31:27.728 * monotonic clock: POSIX clock_gettime
onetime-redis | 1:M 08 May 2024 10:31:27.728 * Running mode=standalone, port=6379.
onetime-redis | 1:M 08 May 2024 10:31:27.729 * Server initialized
onetime-redis | 1:M 08 May 2024 10:31:27.729 * Loading RDB produced by version 7.2.4
onetime-redis | 1:M 08 May 2024 10:31:27.729 * RDB age 19 seconds
onetime-redis | 1:M 08 May 2024 10:31:27.729 * RDB memory usage when created 1.14 Mb
onetime-redis | 1:M 08 May 2024 10:31:27.732 * Done loading RDB, keys loaded: 2, keys expired: 0.
onetime-redis | 1:M 08 May 2024 10:31:27.732 * DB loaded from disk: 0.003 seconds
onetime-redis | 1:M 08 May 2024 10:31:27.732 * Ready to accept connections tcp
onetime-app | [Wed May 8 10:31:28 UTC 2024] INFO: Running entrypoint.sh...
onetime-app | Bundler 2.5.9 is running, but your lockfile was generated with 2.4.12. Installing Bundler 2.4.12 and restarting using that version.
onetime-app | Fetching gem metadata from https://rubygems.org/.
onetime-app | Fetching bundler 2.4.12
onetime-app | Installing bundler 2.4.12
onetime-app | Fetching gem metadata from https://rubygems.org/.
onetime-app | Resolving dependencies...
onetime-app | Using bundler 2.4.12
onetime-app | Installing bundler-graph 0.2.1
onetime-app | Fetching gem metadata from https://rubygems.org/.........
onetime-app | Using rake 13.0.6
onetime-app | Using public_suffix 5.0.5
onetime-app | Using daemons 1.4.1
onetime-app | Using date 3.3.4
onetime-app | Using drydock 0.6.9
onetime-app | Using ast 2.4.2
onetime-app | Using encryptor 1.1.3
onetime-app | Using multi_json 1.15.0
onetime-app | Using byebug 11.1.3
onetime-app | Using ruby-dap 0.1.3
onetime-app | Using bundler 2.4.12
onetime-app | Using mini_mime 1.1.5
onetime-app | Using json 2.7.2
onetime-app | Using eventmachine 1.2.7
onetime-app | Using bcrypt 3.1.20
onetime-app | Fetching method_source 1.0.0
onetime-app | Using redis 4.8.1
onetime-app | Using mustache 1.1.1
onetime-app | Using coderay 1.1.3
onetime-app | Using attic 1.0.1
onetime-app | Using racc 1.7.3
onetime-app | Using rainbow 3.1.1
onetime-app | Using storable 0.10.0
onetime-app | Fetching multi_xml 0.6.0
onetime-app | Using ruby-progressbar 1.13.0
onetime-app | Using timeout 0.4.1
onetime-app | Using rexml 3.2.6
onetime-app | Using ruby_http_client 3.5.5
onetime-app | Using yajl-ruby 1.4.3
onetime-app | Using byebug-dap 0.1.4
onetime-app | Using unicode-display_width 2.5.0
onetime-app | Using gibbler 1.0.0
onetime-app | Using rack 2.2.9
onetime-app | Using addressable 2.8.6
onetime-app | Using net-protocol 0.2.2
onetime-app | Using sendgrid-ruby 6.7.0
onetime-app | Using regexp_parser 2.9.0
onetime-app | Using net-pop 0.1.2
onetime-app | Using sysinfo 0.10.0
onetime-app | Using parallel 1.24.0
onetime-app | Using thin 1.8.2
onetime-app | Fetching net-imap 0.3.7
onetime-app | Fetching parser 3.3.0.5
onetime-app | Using net-smtp 0.5.0
onetime-app | Using otto 1.0.1
onetime-app | Using uri-redis 1.1.1
onetime-app | Using tryouts 2.2.0
onetime-app | Using familia 0.9.3
onetime-app | Installing method_source 1.0.0
onetime-app | Installing multi_xml 0.6.0
onetime-app | Fetching httparty 0.21.0
onetime-app | Using pry 0.14.2
onetime-app | Fetching pry-byebug 3.8.0
onetime-app | Installing net-imap 0.3.7
onetime-app | Using mail 2.8.1
onetime-app | Installing pry-byebug 3.8.0
onetime-app | Installing httparty 0.21.0
onetime-app | Installing parser 3.3.0.5
onetime-app | Fetching rubocop-ast 1.30.0
onetime-app | Installing rubocop-ast 1.30.0
onetime-app | Fetching rubocop 1.50.2
onetime-app | Installing rubocop 1.50.2
onetime-app | Bundle complete! 24 Gemfile dependencies, 54 gems now installed.
onetime-app | Use bundle info [gemname] to see where a bundled gem is installed.
onetime-app | Post-install message from httparty:
onetime-app | When you HTTParty, you must party hard!
onetime-app | --- ONETIME app v0.13 -----------------------------------
onetime-app | onetime[1]: --- ONETIME app v0.13 -----------------------------------
onetime-app | Sysinfo: ruby-unix-linux-x86_64 (3.2.4)
onetime-app | onetime[1]: Sysinfo: ruby-unix-linux-x86_64 (3.2.4)
onetime-app | Config: /app/etc/config
onetime-app | onetime[1]: Config: /app/etc/config
onetime-app | Entropy is low (10000). Generating...
onetime-app | onetime[1]: Entropy is low (10000). Generating...
onetime-app | 2024-05-08 10:31:40 +0000 Thin web server (v1.8.2 codename Ruby Razor)
onetime-app | 2024-05-08 10:31:40 +0000 Maximum connections set to 1024
onetime-app | 2024-05-08 10:31:40 +0000 Listening on 0.0.0.0:3000, CTRL+C to stop
onetime-redis | 1:M 08 May 2024 10:32:28.060 * 10000 changes in 60 seconds. Saving...
onetime-redis | 1:M 08 May 2024 10:32:28.060 * Background saving started by pid 21
onetime-redis | 21:C 08 May 2024 10:32:28.077 * DB saved on disk
onetime-redis | 21:C 08 May 2024 10:32:28.077 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
onetime-redis | 1:M 08 May 2024 10:32:28.161 * Background saving terminated with success

@delano
Copy link
Collaborator

delano commented May 15, 2024

Thanks for all the info. Yeah I can see from the dev tools screenshot that all of the static files are returning 404s.

Can you do one more thing: click on one of the files (e.g. bootstrap.min.css) in that list of network requests, and take another screenshot (or more than one) to capture all of the request and response headers. Check the developer console too b/c there could be relevant error messages there.

For example, browsers can choose to block requests based on certain, specific response headers (or lack of) sent from the server (in this case thin).
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy

@asapcal
Copy link
Author

asapcal commented May 21, 2024

Thanks for the response, sorry for the delay in getting back to you.
Below is a screenshot of the attempt I made using Google Chrome.

Below are the screenshots:

image

image

image

Debug error logs:

Some cookies are misusing the recommended “SameSite“ attribute 13
Loading failed for the <script> with source “http://localhost:3000/js/vendor/cufon-yui.js”. localhost:3000:107:64
Loading failed for the <script> with source “http://localhost:3000/js/vendor/officina.font.js”. localhost:3000:108:68
Loading failed for the <script> with source “http://localhost:3000/js/vendor/jquery-3.6.0.min.js”. localhost:3000:117:48
Uncaught ReferenceError: $ is not defined
http://localhost:3000/:184
localhost:3000:184:5
Loading failed for the <script> with source “http://localhost:3000/js/vendor/bootstrap.min.js”. localhost:3000:247:43
Loading failed for the <script> with source “http://localhost:3000/js/plugins.js?ruby-331”. localhost:3000:248:39
Loading failed for the <script> with source “http://localhost:3000/js/main.js?ruby-331”. localhost:3000:249:36
TypeError: a.default.detectStore(...) is undefined h1-check.js:1:1301
GET
http://localhost:3000/img/logo-36.png
[HTTP/1.1 404 Not Found 22ms]

GET
http://localhost:3000/img/logo-36.png
[HTTP/1.1 404 Not Found 51ms]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dx Developer experience working with onetimesecret ops Operational issues question
Projects
None yet
Development

No branches or pull requests

2 participants