Cannot create new notes with a new user
Open
Nobody has claimed this yet.
1. to develop
bug
need to reproduce
- Dominant language
- JavaScript
- Stars
- 738
- Forks
- 162
- Avg merge
- 6h 2m
- Merged PRs (30d)
- 35
Description
A newly created user on NC cannot create new notes.
Steps to reproduce
- On web-UI try to create a new note and get an error: NotPermittedException
Expected behaviour
New note created.
Actual behaviour
NotPermittedException
Server
- Notes app version: 4.11.0
- Nextcloud version: Nextcloud Hub 9 (30.0.4)
- OS: Debian 12
- Web server: Apache
- PHP version: 8.2
- Database: MariaDB
Log files
Logs:
NotPermittedException Could not create path "/<username>/files/Notes/New note.md"
Controller failed with OCP\Files\NotPermittedException
Full stacktrace:
[notes] Error: Controller failed with OCP\Files\NotPermittedException
POST /index.php/apps/notes/notes
from 192.168.0.33 by newuser at Jan 14, 2025, 9:26:09 AM
1. /var/www/nextcloud/apps/notes/lib/Service/NotesService.php - Line 128
OC\Files\Node\Folder->newFile()
2. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php - Line 161
OCA\Notes\Service\NotesService->create(
"*** sensitive parameters replaced ***"
)
3. /var/www/nextcloud/apps/notes/lib/Service/Util.php - Line 26
OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}(
"*** sensitive parameters replaced ***"
)
4. /var/www/nextcloud/apps/notes/lib/Controller/Helper.php - Line 140
OCA\Notes\Service\Util::retryIfLocked()
5. /var/www/nextcloud/apps/notes/lib/Controller/NotesController.php - Line 160
OCA\Notes\Controller\Helper->handleErrorResponse()
6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - Line 208
OCA\Notes\Controller\NotesController->create(
"*** sensitive parameters replaced ***"
)
7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - Line 114
OC\AppFramework\Http\Dispatcher->executeController()
8. /var/www/nextcloud/lib/private/AppFramework/App.php - Line 161
OC\AppFramework\Http\Dispatcher->dispatch()
9. /var/www/nextcloud/lib/private/Route/Router.php - Line 302
OC\AppFramework\App::main()
10. /var/www/nextcloud/lib/base.php - Line 1003
OC\Route\Router->match()
11. /var/www/nextcloud/index.php - Line 24
OC::handleRequest()
Contributor 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.
Research direction
Reproduce the failure in the web UI, then inspect lib/Service/NotesService.php around line 128 and lib/Controller/NotesController.php around lines 160-161, where the stack trace reaches file creation. Compare behavior for a newly created user with an existing user and trace the NotPermittedException. Done means a new user can create a note successfully without the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100