Notification

Icon
Error

Object reference not set to an instance of an object

Posted: Wednesday, October 4, 2017 2:39:15 PM(UTC)
apap

apap

Member Original PosterPosts: 22
0
Like
This issue has been solved! Click here to view the solution
While deploying a package we have about a dozen nodes that return the following error:
Unexpected failure while connecting to Asset. Object reference not set to an instance of an object.

We are on Version 6.0.100.29
and all the nodes that we are pushing to are Windows 7
Bruce.B
#1Bruce.B Member Administration Posts: 537  
posted: 10/9/2017 4:47:47 PM(UTC)
The error you're receiving on these assets is unfortunately quite a generic null point reference error. I'd recommend checking if the assets in question meet the deployment requirements.

To verify this you can run testconnection.exe which can be found in the Program Files (x86)\Lansweeper\Actions folder on your Lansweeper server. Run the tester directly from your Lansweeper server towards the NetBIOS name of the assets you're getting this error on, using your scanning credentials. The last 2 checks run by the tester need to succeed (c$ and task scheduler check) to be able to deploy on the computer.
apap
#2apap Member Original PosterPosts: 22  
posted: 10/10/2017 6:37:42 PM(UTC)
The Connection Tester comes back without any errors, including the last 2 checks but deployments continue to Object Reference error. Is there anything else we might look at? We have deployed the same package to a few 100 other windows boxes with the same hardware and os build.
thanks ...


Checking C$ Access
Deployment Folder: OK
Access Rights: OK

Checking Task Scheduler
Task was successfully scheduled
Task ran successfully

Task Deleted
RandomAdmin
#3RandomAdmin Member Posts: 5  
posted: 10/10/2017 7:12:34 PM(UTC)
are the trouble computers having an issue with other deployments or just this one? I have had a similar problem in the past and had to delete and then re-add the asset to fix it.
apap
#4apap Member Original PosterPosts: 22  
posted: 10/10/2017 7:40:50 PM(UTC)
All packages tried have failed on this small set of nodes ( the packages work fine elsewhere ).
Deleting and re-adding did not work. Everything adds and scans fine but same deployment error msg.
Bruce.B
#5Bruce.B Member Administration Posts: 537  
posted: 10/11/2017 1:53:52 PM(UTC)
I'd recommend mailing into support@lansweeper.com for this so we can do some debugging if necessary, please include the following:
  • A summary of the issue
  • Program Files (x86)\Lansweeper\Service\Errorlog.txt
  • An export of Deployment\Installer Logs
  • A testconnection.exe output for an asset for which this issue exists, run testconnection.exe directly from your Lansweeper server towards the FQDN of the asset, using your scanning credentials.
erodriguez
#6erodriguez Member Posts: 1  
posted: 12/6/2018 5:36:41 PM(UTC)
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.
pte
#7pte Member Posts: 2  
posted: 10/21/2019 7:22:22 PM(UTC)
Hello,

This is what Lansweeper sent me to fix the issue:

The technical details of the error as seen in your website log indicate that the error is related to asset/user relations.

Your Summary screenshot doesn't show the asset/user relation section of the tab, but we assume the problem assets have one or more asset/user relations of which the Active Directory user no longer exists. You do indicate you terminated a user. One other customer has reported the object reference error under these circumstances. Ordinarily, if an Active Directory user is deleted from Lansweeper, either manually or through cleanup options, its relations are removed as well. This mechanism is broken in Lansweeper 7.2 for cleanup options, resulting in relations remaining in the database even though the user was removed.

We had already reported the aforementioned issue to our developers. The case has ID LAN-4114 in our system and will be referred to as such in our changelog once fixed: https://www.lansweeper.com/changelog/

At the moment, we unfortunately don't have an estimated release date for a fix. For now, you can resolve the issue by manually deleting the faulty relations from the database. To do this, you can run the script below in the Script Execution tab of this tool: Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe. Replace what we've highlighted with the ID of the asset that's in error. An asset's ID is visible in the URL of its Lansweeper webpage.

We recommend backing up your installation prior to running any scripts: https://www.lansweeper.c...ng-up-your-installation/
On an unrelated note, we would also recommend updating to the latest 7.2 build (7.2.100.33) by following these instructions: https://www.lansweeper.c...ating-your-installation/

Delete
From tblAssetUserRelations
Where tblAssetUserRelations.AssetID = 506 And tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)


You should also be able to resolve the issue for all assets at once by running the modified script below. Again though, back up your database first, to be safe. The script below deletes all relations between assets and domain users where the domain user is no longer present in tblADusers.

Delete
From tblAssetUserRelations
Where tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)
pte
#8pte Member Posts: 2  
posted: 10/21/2019 7:23:46 PM(UTC)
Originally Posted by: erodriguez Go to Quoted Post
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.


Check out the latest post for an answer to your question
Bruce.B
#9Bruce.B Member Administration Posts: 537  
posted: 10/22/2019 6:30:55 PM(UTC)
Originally Posted by: pte Go to Quoted Post
Hello,

This is what Lansweeper sent me to fix the issue:

The technical details of the error as seen in your website log indicate that the error is related to asset/user relations.

Your Summary screenshot doesn't show the asset/user relation section of the tab, but we assume the problem assets have one or more asset/user relations of which the Active Directory user no longer exists. You do indicate you terminated a user. One other customer has reported the object reference error under these circumstances. Ordinarily, if an Active Directory user is deleted from Lansweeper, either manually or through cleanup options, its relations are removed as well. This mechanism is broken in Lansweeper 7.2 for cleanup options, resulting in relations remaining in the database even though the user was removed.

We had already reported the aforementioned issue to our developers. The case has ID LAN-4114 in our system and will be referred to as such in our changelog once fixed: https://www.lansweeper.com/changelog/

At the moment, we unfortunately don't have an estimated release date for a fix. For now, you can resolve the issue by manually deleting the faulty relations from the database. To do this, you can run the script below in the Script Execution tab of this tool: Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe. Replace what we've highlighted with the ID of the asset that's in error. An asset's ID is visible in the URL of its Lansweeper webpage.

We recommend backing up your installation prior to running any scripts: https://www.lansweeper.c...ng-up-your-installation/
On an unrelated note, we would also recommend updating to the latest 7.2 build (7.2.100.33) by following these instructions: https://www.lansweeper.c...ating-your-installation/

Delete
From tblAssetUserRelations
Where tblAssetUserRelations.AssetID = 506 And tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)


You should also be able to resolve the issue for all assets at once by running the modified script below. Again though, back up your database first, to be safe. The script below deletes all relations between assets and domain users where the domain user is no longer present in tblADusers.

Delete
From tblAssetUserRelations
Where tblAssetUserRelations.IsLocalUser =
0 And tblAssetUserRelations.Username Is Not Null And
tblAssetUserRelations.Userdomain + '\' + tblAssetUserRelations.Username Not In
(Select tblADusers.Userdomain + '\' + tblADusers.Username From tblADusers)



Important note here: the main post here is about an object reference error received when deploying. The issue that was resolved via your support ticket was about receiving an object reference error when editing assets. Two very different things.

I would advise against running this script unless recommended to by us.
Bruce.B
#10Bruce.B Member Administration Posts: 537  
posted: 10/22/2019 6:33:18 PM(UTC)
Originally Posted by: erodriguez Go to Quoted Post
I know this is an old post but how did this get resolved. I am having the same issue. Although once in a while my deployment goes through. Been dealing with support and everything seems to checkout. Not sure what to do at this point. Please advise.


To get back on the topic of this thread: I've seen object reference errors thrown during deployments in cases where the RemoteDeployment_x64.exe file that gets written to the local computer during deployments is not accessible. This can be due to a firewall, anti-virus, etc. This file gets written to the C:\Windows\LsDeployment folder during the deployment process.

Active Discussions

Lansweeper Creat report ALL office (ms officce,libreoffice,openoffice)
by  RC62N   Go to last post Go to first unread
Last post: 11/15/2019 9:58:33 PM(UTC)
Lansweeper PC Build Report Missing Software
by  RC62N  
Go to last post Go to first unread
Last post: 11/15/2019 8:57:21 PM(UTC)
Lansweeper How to Report on Dynamic Asset Groups
by  Rob-CD   Go to last post Go to first unread
Last post: 11/15/2019 11:49:22 AM(UTC)
Lansweeper Custom All Assets Report Help
by  Matt Fuhrman  
Go to last post Go to first unread
Last post: 11/14/2019 3:55:25 PM(UTC)
Report Center Calculate your network's computing power
by  GBInnovation   Go to last post Go to first unread
Last post: 11/13/2019 12:11:18 PM(UTC)
Lansweeper Patch Tuesday report, last 3 months
by  JacobH  
Go to last post Go to first unread
Last post: 11/12/2019 5:28:37 PM(UTC)
Lansweeper Assets Missing Quickfix Data - Last 60 Days
by  Mike6436   Go to last post Go to first unread
Last post: 11/11/2019 6:11:30 PM(UTC)
Lansweeper BlueKeep Vulnerability
by  jwood.mls  
Go to last post Go to first unread
Last post: 11/11/2019 4:58:59 PM(UTC)