[Bug]: authtoken.ts does not throw or show error in addToken function
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with apps/settings/src/store/authtoken.ts and inspect the addToken error path, then compare how the other functions in that file report failures. Read apps/settings/src/components/AuthTokenSetup.vue to follow its catch handling and reproduce the issue by blocking the /settings/personal/authtokens endpoint. Done means token creation failures result in an error being shown to the user.
Written by the indexing model from the issue text.
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
In apps/settings/src/store/authtoken.ts the addToken function does not throw an error to be used by apps/settings/src/components/AuthTokenSetup.vue the catch section of the code is basically deed code, as the function catches any error and returns null, which is not handled by AuthTokenSetup.vue, it tries to catch an error which is never thrown, and it does not show the error unlike the other functions in the authtoken.ts file.
Steps to reproduce
- Block the '/settings/personal/authtokens' endpoint in the browser, or disable it the server.
- Try to create a new device token, an error is never shown.
Expected behavior
Show an error for the user
Nextcloud Server version
35 (master)
Operating system
RHEL/CentOS
PHP engine version
PHP 8.5
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
- Dominant language
- PHP
- Stars
- 37k
- Forks
- 5.3k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 702
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/server
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
0. Needs triage 35-feedback bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
All issues in nextcloud/server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thephpleague/commonmark#1159 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
awslabs/aidlc-workflows#1879 ·
Maintainers usually reply within 1 day
-
[Bug] The PHP file that lists DNS records truncates records to 12 characters?Possibly taken @sahsanu claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hestiacp/hestiacp#5769 · 2 comments ·
Maintainers usually reply within 1 day
-
bug customer-reported
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MagnaCapax/PMSS#1011 ·
Maintainers usually reply within 5 days
-
Talk Review
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
socallinuxexpo/scale-drupal#351 ·