tamhinsf / ChannelSurf

Move from Slack to Microsoft Teams and manage your Teams environment
114 stars 31 forks source link

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. #36

Open haxplorer opened 4 years ago

haxplorer commented 4 years ago

While running the script to migrate existing channels, I'm getting this error. This is a duplicate of #24 which has been closed prematurely without a solution in place

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 XXXXX to authenticate.                                                                                                               You've successfully signed in.  Welcome xyz@abcd.com                                                                                                                                                                              Groups 
----- <snip> -------
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] XXXXX                                                                                                                                                                                                                            
[1] XXXXXX                                                                                                                                                                              
[2] XXXXXX                                                                                                                                                                                     
Enter the destination Team number or type "new" to create a new Team: 1                                                                                                                                                                      
Team ID is XXXX                                                                                                                                                                                        
Creating temp directory for Slack archive decompression                                                                                                                                                                                      
Temp path is C:\Users\name\AppData\Local\Temp\tmp123C.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\name\path\ChannelSurf\ChannelSurfCli\Utils\Channels.cs:line 90                                                                                                                                                                                                                                           
at ChannelSurfCli.Program.Main(String[] args) in C:\Users\name\path\ChannelSurf\ChannelSurfCli\Program.cs:line 144

Originally posted by @haxplorer in https://github.com/tamhinsf/ChannelSurf/issues/24#issuecomment-722176840