timetracker icon indicating copy to clipboard operation
timetracker copied to clipboard

User cannot be assigned to projects

Open denkwende opened this issue 3 years ago • 24 comments

Since some days users cannot be assigned to projects. grafik

denkwende avatar Nov 04 '21 12:11 denkwende

same here: NC 22.2.0, php 8.0.12, Time Tracker 0.0.72

jjanarnava avatar Nov 06 '21 13:11 jjanarnava

any news or outlook for a fix?

jjanarnava avatar Dec 22 '21 16:12 jjanarnava

same question here. thanks

denkwende avatar Jan 07 '22 12:01 denkwende

is there any update for this issue ??

upultfs avatar Jan 10 '22 01:01 upultfs

Also experiencing this issue. There is no error in the javascript console and the server logs only show the following:

192.168.45.251 - - [11/Jan/2022:17:12:27 +0600] "GET /index.php/apps/timetracker/ajax/tags HTTP/1.1" 200 6210 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0" 192.168.45.251 - - [11/Jan/2022:17:12:31 +0600] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&type=query&=1641913700847 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0"

mxc avatar Jan 11 '22 15:01 mxc

What database backend are you using? Please also share your nextcloud logfile.

mtierltd avatar Jan 12 '22 12:01 mtierltd

select @@version as version; = 8.0.25 - MySQL Community Server

Server: XX.XXX.XX.XXX via TCP/IP
Server-Typ: MySQL
Server-Version: 8.0.25 - MySQL Community Server - GPL
Protokoll-Version: 10
Server-Zeichensatz: cp1252 West European (latin1)

nothing related to the App in the log file...

jjanarnava avatar Jan 12 '22 13:01 jjanarnava

same with 0.0.73, "The results could not be loaded"

jjanarnava avatar Jan 12 '22 17:01 jjanarnava

Working for me on 0.0.73 with Postgres

admorgan avatar Jan 12 '22 18:01 admorgan

My database also Mysql 10.3.32, Time tracker - 0.0.73. and Nextcloud 22.2.0 Users not loading for me too. @mtierltd Is Time tracker runs on specific DB only?

upultfs avatar Jan 13 '22 01:01 upultfs

I am using Postgres with 0.0.73 and have the issue reported. Here is an extract from the log file. I can't see any specific errors but hope it helps.

10.0.0.5 - - [19/Jan/2022:13:06:02 +0200] "PUT /index.php/apps/user_status/heartbeat HTTP/1.1" 200 6235 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0" 10.0.0.5 - - [19/Jan/2022:13:06:03 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&type=query&=1642590342174 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:04 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&type=query&q=za&=1642590342175 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13737 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=zab&type=query&q=zab&=1642590342176 HTTP/1.1" 302 6295 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:06 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13739 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 309 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0" 10.0.0.5 - - [19/Jan/2022:13:06:07 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&type=query&q=za&=1642590342177 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:07 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=zan&type=query&q=zan&=1642590342178 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:08 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13738 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0"

mxc avatar Jan 19 '22 11:01 mxc

Any news on this. Going to wade through the code and see if I can find anything.

mxc avatar Jan 27 '22 19:01 mxc

If I run this command:

curl -u peter:pass -X GET -H "Accept: application/json" -H "OCS-APIRequest: true" 'https://cloud.example.com/ocs/v2.php/cloud/users/details?offset=0&search=za'

I get the expected json response back. All looks good. The URL in the web dev console when requesting from the app looks like this:

?offset=0&search=&term=za&_type=query&q=za'

If I use this url:

https://cloud.example.com/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&_type=query&q=za

I get no results. Looks like the generated URL is wrong?

mxc avatar Feb 10 '22 19:02 mxc

Hello, any news about this problem?

vx76 avatar Feb 28 '22 19:02 vx76

Hi, I don't even get these options on the "edit project' pop-up. The projects are marked as Locked on the projects page, but I only see the options for Name, Color, Archive and Client when I try to edit a project. Update: Figured out how to get to the Users (only works as Admin), but can not add a User. So the issue is exactly as "denkwende" commented on Nov 4, 2021. Can anybody help? TimeTracker-UserIssue

NZNZ8 avatar Mar 01 '22 13:03 NZNZ8

This issue is still unresolved in the 0.0.74 release.

mxc avatar May 01 '22 09:05 mxc

I'm still experiencing this issue.

Elliot-Construct avatar May 19 '22 15:05 Elliot-Construct

This issue is still unresolved in the 0.0.77 release. Just changed project names and now I can't assign a user to it like in the screenshots before.

dbfischer avatar Nov 30 '22 18:11 dbfischer

This is still an Issue in 2023 0.0.77 release. Anyone find a work around. Tried setting up groups and just allowed groups, still no joy.

dthomasdigital avatar Feb 04 '23 17:02 dthomasdigital

This is really a major issue. I would offer a code bounty of 150€ if the issue get fixed. Anyone else feel free to join :)

rg-thkoeln avatar Mar 29 '23 10:03 rg-thkoeln

I think this is an issue with your webserver's configuration. index.php should not be a part of the query:

/ocs/v2.php/cloud/users/details

vs

/index.php/ocs/v2.php/cloud/users/details

Now the timetracker app generates the URL for this query using OC.generateUrl:

url: OC.generateUrl('/ocs/v2.php/cloud/users/details')

So at this point I think that something in the webserver's configuration rewrites the URL incorrectly.

So someone who has this error please provide the complete webserver configuration of yours.

The configuration I use has this location entry:

location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {

As you can see it will properly catch the ocs/v* queries and send them directly to php-fpm.

This is also what's in the official example nginx configuration in the nextcloud documentation as well https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html

mtierltd avatar Mar 29 '23 11:03 mtierltd

I am using apache2. Here is my config.

    <VirtualHost *:443>
            ServerName nextcloud.abc.co.za
            DocumentRoot /var/www/nextcloud
            SSLEngine on
            SSLCertificateFile /etc/letsencrypt/live/nextcloud.abc.co.za/fullchain.pem
            SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.abc.co.za/privkey.pem
            ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
            CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
            Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
            timeout 600
            ProxyTimeout 600
            <Directory /var/www/nextcloud/>
              Options +FollowSymlinks
              AllowOverride All

             <IfModule mod_dav.c>
              Dav off
             </IfModule>
             SetEnv HOME /var/www/nextcloud
             SetEnv HTTP_HOME /var/www/nextcloud

            </Directory>
    </VirtualHost>

mxc avatar Apr 09 '23 16:04 mxc

If I add the following to my Apache configuration the users are now listed.

                RewriteEngine on
                RewriteRule "/index.php/ocs/v2.php/cloud/users/details" "/ocs/v2.php/cloud/users/details"

I haven't tested this thoroughly to see if it causes any issues with other URLs in NextCloud so use at your own risk or at least report back here so we can see if the redirect can be refined. Will let people know if I find any issues. It seems to work so far.

mxc avatar May 27 '23 09:05 mxc

Same here! Any news on this?

PolyDK avatar Oct 05 '23 11:10 PolyDK