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

When I change the IP address of the snipe-It server, In the asset when labels generate the ip address it's identified the previous IP of the server not the current IP when scanning the Qr code.

Open paulo1624 opened this issue 9 years ago • 14 comments

Expected Behavior (or desired behavior if a feature request)

(what you expect to happen goes here)


Actual Behavior

(what actually happens goes here)


Please confirm you have done the following before posting your bug report:


Provide answers to these questions:

  • Is this a fresh install or an upgrade?
  • Version of Snipe-IT you're running
  • Version of PHP you're running
  • Version of MySQL/MariaDB you're running
  • What OS and web server you're running Snipe-IT on
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo: https://snipeitapp.com/demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

https://snipe-it.readme.io/docs/getting-help

paulo1624 avatar Nov 27 '17 22:11 paulo1624

You'll need to clear out your cached barcodes (delete contents of public/uploads/barcodes) and clear your config cache. php artisan config:cache.

snipe avatar Nov 27 '17 22:11 snipe

I tried your suggestions, but still the same issue. QRcode recognized the previous IP of the server.

paulo1624 avatar Nov 27 '17 22:11 paulo1624

Did you change the APP_URL in your .env before doing any of those things?

snipe avatar Nov 27 '17 22:11 snipe

I didn't changed. image

paulo1624 avatar Nov 27 '17 22:11 paulo1624

You have to change that. The APP_URL is literally what defines what URL you're using for the app.

snipe avatar Nov 27 '17 22:11 snipe

I already did to change the APP_URL to IP address of the server. [image deleted]

paulo1624 avatar Nov 27 '17 23:11 paulo1624

but still the same.

paulo1624 avatar Nov 27 '17 23:11 paulo1624

Once you change that, you have to clear your config cache and delete the contents of your barcodes directory as I said above. When you regenerate your labels, they will have the new URL.

snipe avatar Nov 27 '17 23:11 snipe

(Also, never post your APP_KEY publicly.)

snipe avatar Nov 27 '17 23:11 snipe

I had been clear the config cache and delete the content of barcode directory. but its still recognized the previous IP of the server, and then QRcode image its disappear on asset. Please see below image. image

paulo1624 avatar Nov 28 '17 22:11 paulo1624

Only 2 files inside barcodes directory. Done deleting the previous content, and already did config cache clear. image

image

paulo1624 avatar Nov 28 '17 22:11 paulo1624

capture

make sure permision 777 in public/uploads/barcodes

adylimmo avatar May 10 '18 15:05 adylimmo

I am new to Linux and Snipe-IT, and has the Linux server still using DHCP, and I had used that IP address in .env. I finally fixed the IP address and lost all the Avatar images, all pointing to old IP. I updated .env with new IP, and still no joy. running the php artisan config:cache command fixed my issue with the Peoples avatar images. Thanks for this post, it helped.

imaginethatca avatar Mar 06 '19 18:03 imaginethatca

You might be overlooking the section "OPTIONAL: SESSION SETTINGS". Under this section, if you had set the value for "COOKIE_DOMAIN=" to match the APP_URL, you must update the COOKIE_DOMAIN value accordingly or set it to null. I struggled for hours before I find out this. Then, you may need to run the command to clear the cache: config:clear, cache:clear, view:clear, route:clear. After these commands, restart Apache2, then run php artisan config:cache. I am not certain all these commands help, but I used them in that order, and it worked for me: I was able to run Snipe-IT with a different name. Hope this helps.

regjonh avatar Feb 11 '20 21:02 regjonh