Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Integration Nextcloud OpenProject

Integration Nextcloud OpenProject

Added by Alexander Pietsch over 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)

RE: Integration Nextcloud OpenProject - Added by Eric Schubert over 2 years ago

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

RE: Integration Nextcloud OpenProject - Added by Alexander Pietsch over 2 years ago

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

RE: Integration Nextcloud OpenProject - Added by Adam Szabo over 2 years ago

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

RE: Integration Nextcloud OpenProject - Added by Eric Schubert over 2 years ago

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 enable Persist 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

GET https://nextcloud.local/index.php/apps/oauth2/authorize?client_id=VTqcnqHPs1eXdKF6jtgAbe6KKwCKczBqOKr20DGHgdlN1uqK8qnHa88eTyhabxXj&response_type=code&state=8d452361-7f5b-4961-97f7-b3666b3c5a00
GET https://openproject.local/oauth_clients/VTqcnqHPs1eXdKF6jtgAbe6KKwCKczBqOKr20DGHgdlN1uqK8qnHa88eTyhabxXj/callback?state=8d452361-7f5b-4961-97f7-b3666b3c5a00&code=bayiRt8klT0pQ1OUmGo8rsfzDHzVKkJcpKgIxj6scgqdaMDeglaKdX5D8si17XzgLLg1yqwC1NDkMmWLymT4i71tJN629hgynHtoadGIQHFNl70zNqxEb4T7LKc54W3k

RE: Integration Nextcloud OpenProject - Added by Andreas Schneider over 2 years ago

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:

proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto https;

And changed the value of OPENPROJECT_HTTPS from false to true inside the file /etc/openproject/conf.d/other, followed by a openproject 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.

RE: Integration Nextcloud OpenProject - Added by Eric Schubert over 2 years ago

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

  • (1 - 6/6)
Loading...