tamhinsf / ChannelSurf

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

Unhandled Exception: System.IO.FileNotFoundException: Could not find file #18

Open kpedoti opened 5 years ago

kpedoti commented 5 years ago

kgoudped MINGW64 /c/chef-repo/cookbooks/ChannelSurf/ChannelSurfCli (master) $ dotnet run ./hbm.zip


Welcome to Channel Surf! This tool makes it easy to bulk create channels in an existing Microsoft Team. All we need a Slack Team export ZIP file whose channels you wish to re-create. Or, you can define new channels in a file called channels.json.



Tenant is xxxxxxxxxxxxxxxxxxxxx Application ID is xxxxxxxxxxxx Redirect URI is https://channelsurf-cli



Your tenant admin consent URL is https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=xxxxxxxxxxxxxxxxxx efd9fd543013&redirect_uri=https://channelsurf-cli&prompt=admin_consent&nonce=xxxxxxxxxx



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 ES7M4EZE5 to authenticate. You've successfully signed in. Welcome kgoudped@xxx.co Groups {"@odata.context":"https://graph.microsoft.com/beta/$metadata#groups","value":[{"id":"d8af8e22-5850-4360-a07f-6a68a91e8c1d","displayName":"Slack Migration","description":"Slack Migration","isArchived":false},{"id":"27f33ef8-bcde-470d-913d-ec4255df9459","displayName":"DevOps","description":"Testing DevOps team access","isArchived":false},{"id":"5cc4cf1a-86b9-4401-96f0-975e4419e292","displayName":"Slack Migration Team Leads","description":"Slack Migration Team Leads","isArchived":false},{"id":"36a36700-5d24-464c-a2c5-a3ce98ffc1d5","displayName":"fg-devops-team","description":"fg-devops-team","isArchived":false},{"id":"4039224d-71d3-4d62-b5e8-f67bbd42896c","displayName":"import","description":"import","isArchived":false}]} 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] Slack Migration Slack Migration [1] DevOps Testing DevOps team access [2] Slack Migration Team Leads Slack Migration Team Leads [3] fg-devops-team fg-devops-team [4] import import Enter the destination Team number or type "new" to create a new Team: 1 Team ID is xxxxxxxxxxxxxxxxxx Creating temp directory for Slack archive decompression Temp path is C:\Users\kgoudped\AppData\Local\Temp\tmp4158.tmp Slack archive decompression done Scanning channels.json

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\kgoudped\AppData\Local\Temp\tmp4158.tmp\channels.json'. at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at ChannelSurfCli.Utils.Channels.ScanSlackChannelsJson(String combinedPath) in C:\chef-repo\cookbooks\ChannelSurf\ChannelSurfCli\Utils\Channels.cs:line 20 at ChannelSurfCli.Program.Main(String[] args) in C:\chef-repo\cookbooks\ChannelSurf\ChannelSurfCli\Program.cs:line 140

switchflyIT commented 4 years ago

Im seeing this as well. I didnt get this when I ran the program directly from the slack export, but that export had way more than 200 channels and it crapped out when it hit that channel limit from Teams.

I tried to modify the channels.json to only include the channels that I wanted, and it gets to this same point. The temp directory is created and the channels.json exists within it.

Does this seem permissions related? Odd that it works with just the straight slack export tho