List of all assets is empty after upgrading
Expected Behavior (or desired behavior if a feature request)
List of all assets shows all assets.
Actual Behavior
List of all assets is empty. Browser console shows: TypeError: can't assign to property "fieldIndex" on "[": not an object bootstrap-table.min.js:7:628
I found something similar in the common issues section, but this says to check APP_URL which is correct
Please confirm you have done the following before posting your bug report:
- [X ] I have enabled debug mode
- [X ] I have read checked the Common Issues page see above, APP_URL is correct
Provide answers to these questions:
-
Is this a fresh install or an upgrade? Upgrade
-
Version of Snipe-IT you're running v4.3.0 - build 3559 (master)
-
Version of PHP you're running 7.0
-
Version of MySQL/MariaDB you're running MariaDB10.1
-
What OS and web server you're running Snipe-IT on Debian 9.4 with apache 2.4
-
What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Upgrade was done with php upgrade.php
-
WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error no error shown in browser, just in JS console: TypeError: can't assign to property "fieldIndex" on "[": not an object bootstrap-table.min.js:7:628
-
What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error /hardware -> list of all assets
-
If a stacktrace is provided in the error, include that too. Do you want the JS stack trace here?
-
Any errors that appear in your browser's error console. TypeError: can't assign to property "fieldIndex" on "[": not an object bootstrap-table.min.js:7:628
-
Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo. No
-
Include any additional information you can find in
storage/logsand your webserver's logs. Nothing unfortunately -
Include what you've done so far in the installation, and if you got any error messages along the way. We are using this since 1.5 years in different versions
-
Indicate whether or not you've manually edited any data directly in the database No!
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
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I have the same problem. I have tried it on MySQL 5.7 and miriaDB. 10.14 : Windows server 2016 & IIS Here is the query that it tries to run. Everytime it times out for me. I have 34,432 records in the list all. List all works on previous versions with the same setup. For some reason it does not like this query that was introduced in 4.3. I hope this helps with the troubleshooting.
SELECT
assets.,
(SELECT
COUNT()
FROM
action_logs
WHERE
assets.id = action_logs.item_id
AND item_type = 'App\Models\Asset'
AND action_type = 'checkin from') AS checkins_count,
(SELECT
COUNT()
FROM
action_logs
WHERE
assets.id = action_logs.item_id
AND item_type = 'App\Models\Asset'
AND action_type = 'checkout') AS checkouts_count,
(SELECT
COUNT()
FROM
action_logs
WHERE
assets.id = action_logs.item_id
AND item_type = 'App\Models\Asset'
AND action_type = 'requested') AS user_requests_count
FROM
assets
INNER JOIN
status_labels AS status_alias ON status_alias.id = assets.status_id
AND status_alias.archived = 0
WHERE
assets.deleted_at IS NULL
ORDER BY name ASC
LIMIT 20 OFFSET 0
In my case it does not look like a timeout problem since the empty list appears immediatly. I only have some 50+ assets in the db :)
Problem still exists after upgrade to v4.3.0 - build 3586 (master)
Problem still exists after upgrade to v4.4.2 - build 3666 (master)
Problem still exists after upgrade to v4.6.3 - build 3866 (master)
I've just started experiencing this on a system installed/setup this afternoon (Ubuntu 16.04 git clone / install.sh). It worked fine before, with the change between before/after being only the defining of additional custom fields.
Digging a little further, it appears that it is reproducible by including a custom field which contains ~~brackets (())~~ quotes("") within the name.
Specifically, removing the relevant field from the fieldset allows the page to show correctly and re-adding it triggers the stack-trace below.
~~I had a very brief attempt at reproducing this on the demo server without luck. Perhaps @hbrecht could comment on whether the brackets symptoms can be reproduced on their installation?~~
EDIT: Scratch the comment about brackets - turns out it was the double quotes within the field name that was causing problems and this can be reproduced on the demo server.
TypeError: can't assign to property "fieldIndex" on "[": not an object bootstrap-table.min.js:7:628
f <redacted>/js/bootstrap-table.min.js:7:628
o.prototype.initTable <redacted>/js/bootstrap-table.min.js:7:10367
BootstrapTable.prototype.initTable <redacted>/js/extensions/cookie/bootstrap-table-cookie.js:294:9
o.prototype.init <redacted>/js/bootstrap-table.min.js:7:7451
BootstrapTable.prototype.init <redacted>/js/extensions/mobile/bootstrap-table-mobile.js:91:9
BootstrapTable.prototype.init <redacted>/js/extensions/cookie/bootstrap-table-cookie.js:279:9
o <redacted>/js/bootstrap-table.min.js:7:2730
a.fn.bootstrapTable/< <redacted>/js/bootstrap-table.min.js:8:22036
each <redacted>/js/dist/all.js:1:24007
each <redacted>/js/dist/all.js:1:22664
a.fn.bootstrapTable <redacted>/js/bootstrap-table.min.js:8:21727
<anonymous> <redacted>/hardware:819:9
u <redacted>/js/dist/all.js:2:18035
o/</c< <redacted>/js/dist/all.js:2:18340
Yes, I just wanted to confirm: It was double quotes. As in Screen size (") Worked before :-)
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
Not sure - we removed the double quotes from our fields and did not add them again to avoid any issues.
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!
@snipe I'm unable to reproduce on v5 Dev, unless i'm looking at the wrong spot. This issue may have been resolved with updating the JS libraries for V5.
