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

Can't update urbanairship.netstandard from 14.1.1 to 14.2.0 #181

Closed
alexkozler opened this issue Jun 14, 2021 · 13 comments
Closed

Can't update urbanairship.netstandard from 14.1.1 to 14.2.0 #181

alexkozler opened this issue Jun 14, 2021 · 13 comments

Comments

@alexkozler
Copy link

alexkozler commented Jun 14, 2021

Whenever I try to upgrade my Xamarin.Forms project to use urbanairship.netstandard 14.2.0 I get this:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Alex\.nuget\packages\urbanairship.ios.automation\14.4.1\content\AirshipBindings.iOS.Automation.resources\AirshipAutomation.xcframework\ios-arm64_x86_64-simulator\AirshipAutomation.framework\PrivateHeaders\UAScheduleTriggerContextTransformer+Internal.h'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.Create(String path)
   at NuGet.Packaging.NuGetExtractionFileIO.CreateFile(String path)
   at NuGet.Packaging.StreamExtensions.CopyToFile(Stream inputStream, String fileFullPath)
   at NuGet.Packaging.PackageFileExtractor.ExtractPackageFile(String source, String target, Stream stream)
   at NuGet.Packaging.PackageArchiveReader.CopyFiles(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken token)
   at NuGet.Packaging.PackageReaderBase.CopyFilesAsync(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken cancellationToken)
   at NuGet.Packaging.PackageExtractor.<>c__DisplayClass5_0.<<InstallFromSourceAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Packaging.PackageExtractor.<InstallFromSourceAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.ProjectRestoreCommand.<InstallPackageAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.ProjectRestoreCommand.<>c__DisplayClass15_1.<<InstallPackagesAsync>b__4>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.ProjectRestoreCommand.<InstallPackagesAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.Commands.ProjectRestoreCommand.<TryRestoreAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__55.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.RestoreRunner.<ExecuteAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.RestoreRunner.<CompleteTaskAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Commands.RestoreRunner.<RunWithoutCommit>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.DependencyGraphRestoreUtility.<PreviewRestoreProjectsAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewBuildIntegratedProjectsActionsAsync>d__81.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewBuildIntegratedProjectActionsAsync>d__80.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewUpdatePackagesForBuildIntegratedAsync>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<>c__DisplayClass56_1.<<PreviewUpdatePackagesAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewUpdatePackagesAsync>d__56.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<>c__DisplayClass21_0.<<GetUpdateActionsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<CatchAndRethrowExceptionAsync>d__29`1.MoveNext()

I have tried clearing all the Nuget caches and whatnot manually, clearing out the folder(s) noted in the errors, and even tried using VS for Mac instead.

@alexkozler
Copy link
Author

For what it's worth, trying to install urbanairship.ios.automation manually results in the same error.

@marc-scig
Copy link
Contributor

@alexthekid07 that's strange. so you tried it on macOS as well and it still has the same error? what version of visual studio are you using?

@alexkozler
Copy link
Author

Using VS 2019 Enterprise 16.11.0 Preview 1.0

I also use the Preview channel on macOS and get the same error. Not sure if it's related.

@marc-scig
Copy link
Contributor

@alexthekid07 we're on the stable release (VS Community 8.0.8 for Mac, Version: 14.16.0.5 for Xamarin iOS). It's possible this is related, do you have a non-preview version laying around? I can also try to upgrading my VS to the current preview version though I'm a little wary of doing this since it can often be difficult to undo.

@jm-parent
Copy link

jm-parent commented Aug 9, 2021

Same error here.

Firstly with the same file then I knew some issue with "path lenght" limited to 256 characters for Visual Studio Project.
I guess we have same things here.

I tried to change nuget repository path , but ...
We still have a path > 256 characters.

262 chars here : D:.p\urbanairship.ios.messagecenter\14.4.1\content\AirshipBindings.iOS.MessageCenter.resources\AirshipMessageCenter.xcframework\ios-arm64_x86_64-maccatalyst\AirshipMessageCenter.framework\Versions\Current\Resources\UADefaultMessageCenterListViewController.nib

Error still here with another file this time.
Lenght seems to be the issue.

And Nuget Lenght is already > 256 :(

@jm-parent
Copy link

From :
image
To :
image

Still no changes from Airship Team ? :'(

@marc-scig
Copy link
Contributor

Hi @jm-parent,

Sorry you're having this issue. Does the issue still persist if you follow the instructions in this article about enabling long paths in Windows?

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

We do not have a Windows build system at the moment, so it's difficult to reproduce on our end. @alexthekid07 were you ever able to find a workaround for this?

@alexkozler
Copy link
Author

Nope, I've just let it be for now. I get the same error on VS for Mac, too. Doesn't seem to be a file path length issue for me.

I'll probably update to VS2022 soon and see if it still happens there.

@marc-scig
Copy link
Contributor

@alexthekid07 The offending path in your original error log is 261 characters, though. I'm considering whether it might be possible to shorten them by abbreviating some of the non-file-related bits, but if it's a problem on Mac as well that may not help.

@jm-parent
Copy link

Hi @jm-parent,

Sorry you're having this issue. Does the issue still persist if you follow the instructions in this article about enabling long paths in Windows?

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

We do not have a Windows build system at the moment, so it's difficult to reproduce on our end. @alexthekid07 were you ever able to find a workaround for this?

That's what i did after all.
Seems ok for me ;)

( this regedit variable have to be set to true by default ! :D )

@alexkozler
Copy link
Author

@marc-scig Still getting this error trying to update to the newer "airship.ios"

  • I've uninstalled all the previous versions.
  • I've increased the path length registry key you suggested (and rebooted)
  • I've cleared all Nuget caches

"airship.netstandard" installs fine.
"airship.android.fcm" installs fine.
"airship.ios" results in this error:

Could not find a part of the path 'C:\Users\Alex\.nuget\packages\airship.ios.preferencecenter\16.4.0\content\res\AirshipPreferenceCenter.xcframework\ios-arm64_x86_64-simulator\AirshipPreferenceCenter.framework\Modules\AirshipPreferenceCenter.swiftmodule\x86_64-apple-ios-simulator.swiftinterface'.

@rlepinski
Copy link
Collaborator

@alexthekid07 If you move your nugets to C:/ you will be under the max path length. It sounds like Xamarin will provide a proper solution later this year - xamarin/xamarin-macios#10819 (comment) so hopefully this issue will eventually go away.

@jyaganeh
Copy link
Contributor

Closing this due to inactivity. If these issues persist, please file a new issue.

@jyaganeh jyaganeh closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 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

5 participants