snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Dropdown Menu's non functional

Open Myr4nium opened this issue 3 years ago • 15 comments

Debug mode

Describe the bug

Drop-down menus are continuously loading and returning no results. It's only started to happen within recent weeks, but I can't see anyone else reporting it, so am unsure if its the version or something specific to me. Both my instances started doing it at the same time. Both run off different SQL Servers.

audit problem

Reproduction steps

  1. Go to the Quick Audit page
  2. Use the location drop-down menu 3. ...

Expected behavior

Drop-down menu shows the results it specifies. I.e. my assets, my users or my locations.

Screenshots

No response

Snipe-IT Version

6.1.0 - build10161 (master)

Operating System

Unraid

Web Server

Apache

PHP Version

8.1.17

Operating System

Windows

Browser

Chrome and Opera GX

Version

Latest for both, updated while troubleshooting.

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

Tried a fresh install, but got the same errors. Now at a loss

Myr4nium avatar Apr 13 '23 15:04 Myr4nium

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Apr 13 '23 15:04 welcome[bot]

Both my instances started doing it at the same time. Both run off different SQL Servers.

Unfortunately, that doesn't help much if we don't know if they're both updated around the same time, what the browser errors and app logs might indicate, etc. Did you run migrations? Have you tried updating them to latest? I can't reproduce this on the demo or develop demo, so I'm not sure where else to point you.

snipe avatar Apr 16 '23 07:04 snipe

Might possibly be related to this: https://github.com/snipe/snipe-it/pull/12467

Is this happening to all dropdown or just some? Do you have full company support turned on?

snipe avatar Apr 16 '23 07:04 snipe

I'm experiencing the same issue. Full Multiple Companies Support is turned off in my case.

chndler avatar Apr 16 '23 17:04 chndler

Unfortunately, I haven't been able to reproduce this anywhere, so I'm not really sure where to go next for this.

snipe avatar Apr 16 '23 18:04 snipe

Anything in your app logs or browser console that might be useful?

snipe avatar Apr 16 '23 18:04 snipe

@snipe just checked the browser console and saw mixed content errors. Checked my .env file and realized our APP_URL was still http not https 🤦‍♂️ changed to https, reloaded the .env file, and all is good now! Sorry for not checking the browser console in the first place. Thanks for everything!

chndler avatar Apr 16 '23 19:04 chndler

@chndler Ah, glad you're sorted! (I'm honestly a little surprised a lot more stuff wasn't breaking for you at that point! We rely pretty heavily on that APP_URL to load images, JS, etc.)

snipe avatar Apr 16 '23 19:04 snipe

I have Apache configured to upgrade requests to https so I'm guessing that sorted most things out? But I agree I'm surprised myself!

chndler avatar Apr 16 '23 20:04 chndler

Hi. I checked my APP_URL too after seeing that. Problem solved. Haha

Sorry for wasting your time @snipe and thanks for working that out @chndler

Myr4nium avatar Apr 16 '23 21:04 Myr4nium

I had this same issue as well. I am using HAProxy in front of SnipeIT, so I assumed that the APP_ENV variable should be http (because from SnipeIT's perspective it is serving the web requests between the reverse proxy and itself using http). I am terminating the ssl session at HAProxy.

However, after changing the APP_ENV variable to "https://MY_URL.com" issues went away.

Thanks team.

stephecannon avatar Oct 06 '23 18:10 stephecannon

I had this same issue as well. I am using HAProxy in front of SnipeIT, so I assumed that the APP_ENV variable should be http (because from SnipeIT's perspective it is serving the web requests between the reverse proxy and itself using http). I am terminating the ssl session at HAProxy.

However, after changing the APP_ENV variable to "https://MY_URL.com" issues went away.

Thanks team.

Thanks for your comment. I did the opposite and set it to http://MYURL.COM , and now my dropdowns and companies are showing.

This was with CADDY proxy within opnsense

Alex9001 avatar May 03 '24 00:05 Alex9001

My team reported the same issue. Modifying the .env file fixed the UI menu rendering but broke SAML, locking out anyone without a password login enabled account. Be careful making this change blindly. Currently investigating a workaround.

Excalibur025 avatar May 07 '24 21:05 Excalibur025

I had this same issue as well. I am using HAProxy in front of SnipeIT, so I assumed that the APP_ENV variable should be http (because from SnipeIT's perspective it is serving the web requests between the reverse proxy and itself using http). I am terminating the ssl session at HAProxy.

However, after changing the APP_ENV variable to "https://MY_URL.com" issues went away.

Thanks team.

Yep – we are not using HAProxy but did move to SSL and I never updated APP_URL in the .env file. Was driving me crazy for WEEKS. Updated http to https and it immediately worked (after a page refresh, of course). Appreciate all the insights here, thanks everyone and @snipe for hooking me up on the Discord!

teezyyoxo avatar Apr 07 '25 16:04 teezyyoxo

@Excalibur025 You can try APP_FORCE_TLS=true in your .env and see if that helps.

Edit: Oof, sorry - I didn't notice this issue was so old. 😬

snipe avatar Apr 07 '25 18:04 snipe