Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP sync error #13372

Closed
2 tasks done
TDCC-T opened this issue Jul 27, 2023 · 6 comments
Closed
2 tasks done

LDAP sync error #13372

TDCC-T opened this issue Jul 27, 2023 · 6 comments

Comments

@TDCC-T
Copy link

TDCC-T commented Jul 27, 2023

Debug mode

Describe the bug

The LDAP synchronization encountered an error while executing the command "php artisan snipeit:ldap-sync".

Error message:

"production.ERROR: Attempt to read property 'id' on null {"userId":77,"exception":"[object] (ErrorException(code: 0): Attempt to read property 'id' on null at /data/snipe-it_p/app/Console/Commands/LdapSync.php:246)"

This error is consistent with the 500 error encountered when performing the LDAP synchronization without selecting a location on the web interface.

Reproduction steps

Execute the command: "php artisan snipeit:ldap-sync".

or

Click on LDAP sync on web, but don't select a location.

Expected behavior

Ldap sync success.

Screenshots

image

Snipe-IT Version

v6.1.2 build 10938 (g32747cafd)

Operating System

CentOS 7

Web Server

Nginx

PHP Version

8.0.29

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

@welcome
Copy link

welcome bot commented Jul 27, 2023

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@TDCC-T TDCC-T changed the title ldap sync error LDAP sync error Jul 27, 2023
@02ms05
Copy link

02ms05 commented Jul 31, 2023

+1
I am having the exact same problem

@mihaiolimpiu
Copy link

mihaiolimpiu commented Aug 2, 2023

Hi, we have the same sync issue, the problem is that if the code breaks if a location is null.
Attached the solution to fix the issue in code by our software engineer.

LdapSync_new.zip

LDAP sync FIX

@mihaiolimpiu
Copy link

mihaiolimpiu commented Aug 2, 2023

Above fix is not working properly. Will look into it.

Edit: The posted fix by user @uberbrady is correct and proper.

We can close this if commit goes trough. #13397

@lerroot
Copy link

lerroot commented Aug 3, 2023

Same issue-

Snipe-IT version
v6.1.2 build 10938 (g32747cafd)
Software License
AGPL3
PHP Version
8.1.2-1ubuntu2.13
Laravel Version
8.83.22

Is there a timeline for a fix for this issue? I attempted to revert to an older container (version 5.4.1.6746) using same database, but it breaks LDAP integration (tests fail). Is there a container version that works? Is there some ldap-related db issue when reverting to an older container with the db used for a newer version?

@TDCC-T TDCC-T closed this as completed Aug 3, 2023
@lerroot
Copy link

lerroot commented Aug 4, 2023

What version of snipeIT will this fix be incorporated into?

@TDCC-T TDCC-T reopened this Aug 5, 2023
@snipe snipe closed this as completed in 32d8d8c Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants