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

Object reference not set to an instance of an object - Issue with NullReferenceException #24

Closed
chiragss21 opened this issue Nov 21, 2019 · 4 comments

Comments

@chiragss21
Copy link

Hi, I'm getting an error: Object reference not set to an instance of an object. See detailed error below. Can you tell me what I would need to change in order to fix this error? Thank you!

Let's get started! Sign in to Microsoft with your Teams credentials:
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXXXX to authenticate.
You've successfully signed in.  Welcome example@example.com
Groups {"@odata.context":"https://graph.microsoft.com/beta/$metadata#teams","@odata.count":3,"value":[{"id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","displayName":"XXXXXXXX","description":"XXXXXXXX","internalId":null,"classification":null,"specialization":null,"visibility":null,"webUrl":null,"isArchived":false,"memberSettings":null,"guestSettings":null,"messagingSettings":null,"funSettings":null,"discoverySettings":null},{"id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","displayName":"XXXXXXX","description":"XXXXXXX","internalId":null,"classification":null,"specialization":null,"visibility":null,"webUrl":null,"isArchived":false,"memberSettings":null,"guestSettings":null,"messagingSettings":null,"funSettings":null,"discoverySettings":null},{"id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","displayName":"XXXXXXXXX","description":"XXXXXXXXXX","internalId":null,"classification":null,"specialization":null,"visibility":null,"webUrl":null,"isArchived":false,"memberSettings":null,"guestSettings":null,"messagingSettings":null,"funSettings":null,"discoverySettings":null}]}
You're currently a member of these Teams
WARNING: If you don't have permission to create new channels for a given Team, your attempt to create or migrate channels will fail
[0] XXXXXXXX XXXXXXXX
[1] XXXXXXXX XXXXXXXX
[2] XXXXXXXX XXXXXXXX
Enter the destination Team number or type "new" to create a new Team: 0
Team ID is xxxxxxxxxxxxxxxxxxxx
Creating temp directory for Slack archive decompression
Temp path is C:\Users\abc\AppData\Local\Temp\tmpABF9.tmp
Slack archive decompression done
Scanning channels.json
Scanning channels.json - done
Creating channels in MS Teams

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at ChannelSurfCli.Utils.Channels.CreateChannelsInMsTeams(String aadAccessToken, String teamId, List`1 slackChannels, String basePath) in C:\Users\abc\Desktop\ChannelSurf-master\ChannelSurfCli\Utils\Channels.cs:line 90
   at ChannelSurfCli.Program.Main(String[] args) in C:\Users\abc\Desktop\ChannelSurf-master\ChannelSurfCli\Program.cs:line 144

C:\Users\abc\Desktop\ChannelSurf-master\ChannelSurfCli>
@chiragss21
Copy link
Author

chiragss21 commented Nov 24, 2019

Note: This issue showed up when running the program via Command Prompt on a Windows 10 Pro machine, however it worked correct when running it via PowerShell. I tried running it on Command Prompt with administrator privileges as well as PowerShell with administrator privileges, and the same results show up. Thank you!

@pauldf78
Copy link

I have this same issue, were you able to resolve it?

@chiragss21
Copy link
Author

@pauldf78 - I wasn't able to resolve the error, but I believe I was able to run it on a Mac or via Powershell on Windows 10 Pro.
However, for my needs, this wasn't enough, as it didn't include all required items. Following the instructions in the README.md might help you get past this error, and trying on multiple different devices.

@haxplorer
Copy link

I'm facing the same issue now. The issue is consistently there irrespective of whether I run it as admin or as a normal user.

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

3 participants