Content
You are here:
Integration Nextcloud OpenProject
Added by Alexander Pietsch about 2 years ago
I have linked my nextcloud to the open project. I can also assign files or folders to a project in OP from the NC.
On the other hand, if I come from the OP, he first asks for a registration, which I approve in the NC. Then I get the following error message in the OP:
OAuth2 'state' not found in 'callback' endpoint (redirect_uri).
The 'state' is used to indicate on OpenProject where to continue after a successful OAuth2 authorization. A missing status is an internal error that can occur during setup. Please contact your system administrator.
Where do I have to look for the error? NC or OP?
Does somebody has any idea?
Many greetings
Alexander
Replies (6)
Ahoi Alexander,
can you provide me some detailed information on your issue?
How does the network traffic look like, while the OAuth flow starting from OP? This starts with the the request, OP uses to visit NC, and it ends with the URL used to get back to OP. As the process makes transitions across both websites, it is important to check the "persistent log" in your browsers dev tools.
Usually one could run into that error with some misconfiguration on NC side, leading to the fact, that the nextcloud server "think" running at a different URL, then used in the browser to access NC, like when hosting NC behind a reverse proxy.
If you have any question or trouble executing my requests, let me know.
Best
Eric
Hello Eric,
Thank you for your feedback signal.
I followed the instructions:
https://www.openproject.org/docs/system-admin-guide/integrations/nextcloud/
I transferred the URLs, IDs and secrets to the other systems accordingly. That's how it worked. I can also create the NC memory in the OP. I only get the error message when I want to access the data in the NC from the OP. Or differently, if I register at the NC.
Unfortunately, I don't know how to get the information you need from the browser's developer tool.
Where can I check the URLs?
Many greetings
Alexander
Hi Alexander,
Are there errors in the browser console? (CLICK HERE FOR INFORMATION ON HOW TO OPEN YOUR BROWSER'S CONSOLE)\
we would need the console and the network tabs
Thank you
BR Adam
Ahoi Alexander,
if you follow Adams link and open you dev tools in the browser, you can access the tab
Network
there. Make sure to enablePersist logs
setting, before reproducing your issue. This setting's location depends by the browser you are using. E.g. in Mozilla Firefox this is to be found under the small settings icon to the very right.Within the network logs, you will find a vast amount of request done by your browser. After reading carefully, you will see, that the browser changes location twice (from OP to NC and vice versa). At the very beginning of both transitions there should be two requests, that look like those I posted here. Can you put in yours, too? And any error that occurs? Of course please hide your domain. I did not, as what you can see here is a local test instance.
Best
Eric
Hello
I installed OpenProject just today. It amazes me that it doesn't just come integrated into UCS, but also features a brand new Nextcloud integration.
I stumbled into the same error as @Alexander Pietsch: The login to OpenProject from Nextcloud and adding files to Work packages inside Nextcloud work, but the other way around I get the same error message when redirected back to OpenProject.
I was just about to document the problem including redirect links but I noticed redirects to http:80 followed by 301 redirects to my actual https:443 URL. It was then that I knew disabling SSL when installing, as SSL is handled by my nginx reverse proxy, was probably problematic.
I could solve the problem by following the Documentation "Configuring SSL". I added two lines to my nginx configuration:
And changed the value of
OPENPROJECT_HTTPS
fromfalse
totrue
inside the file/etc/openproject/conf.d/other
, followed by aopenproject restart
. Tada, it works like a charm!Hope this helps you, too, Alexander. And kudos to the quick and helpful replies Eric and Adam. Makes me want to join the community and contribute even more! :)
If you could still use the request logs, I can reproduce the error any time.
Great, many thanks to you, Andreas!
Yeah, in the days after releasing the nextcloud integration, we received more and more issues like that. And most of them are related to invalid TLS configs in the servers and/or missing certificates.
Hopefully we can achieve more transparency on the reasons of those connection problems, so that users will be able to figure them out by themselves and quickly solve them.
Best
Eric