GoogleApisForiOSComponents icon indicating copy to clipboard operation
GoogleApisForiOSComponents copied to clipboard

Firebase.CloudMessaging Failed to resolve on Windows

Open Ahmadpashaquarterpi opened this issue 2 years ago • 21 comments

I installed Firebase cloud messaging nuget on mac, where it worked fine and the namespaces were being resolved, but then I opened the same project on Visual Studio 2022 Preview on windows, but I am getting following error when I try to restore the nuget packages.

Error occurred while restoring NuGet packages: Could not find a part of the path 'C:\Users\RBTG.nuget\packages\xamarin.firebase.ios.installations\8.10.0.1\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_i386_x86_64-simulator\FirebaseInstallations.framework\Headers\FirebaseInstallations-umbrella.h'.

Ahmadpashaquarterpi avatar Jul 28 '22 12:07 Ahmadpashaquarterpi

Same error bug was xamarin.firebase.ios.remoteconfig

maonaoda avatar Jul 30 '22 07:07 maonaoda

I ended up having to roll back to 8.10.0

maonaoda avatar Jul 30 '22 07:07 maonaoda

Same issue

justinimel avatar Aug 03 '22 01:08 justinimel

@maonaoda thanks, I will try try version 8.10.0

Ahmadpashaquarterpi avatar Aug 03 '22 05:08 Ahmadpashaquarterpi

Same. Seems to be a botched Nuget package? I'm missing header files. image

'C:....nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'.

dunlavy avatar Aug 06 '22 19:08 dunlavy

Same issue. Missing FirebaseInstallations-umbrella.h header

robheffo79 avatar Sep 07 '22 01:09 robheffo79

Got the same issue....trying 8.10.0

sstahurski avatar Sep 15 '22 00:09 sstahurski

Same error here.

wagenheimer avatar Sep 16 '22 12:09 wagenheimer

Same

Diyari-Kurdi avatar Oct 04 '22 22:10 Diyari-Kurdi

I ended up adding nuget.config into solution folder with this content -

<add key="globalPackagesFolder" value="c:\temp" />

It fixed the issue, where path to nuget component was too long for windows to handle.

kyakhta avatar Oct 13 '22 15:10 kyakhta

Same

wowsense avatar Nov 21 '22 05:11 wowsense

The problem is nuget package manager and the limited path length. Old problem. As a workaround set a environment variable: NUGET_PACKAGES with value c:\nuget and restart Visual Studio.

AlleSchonWeg avatar Nov 22 '22 07:11 AlleSchonWeg

We encountered this build error on Windows as well, on version: 8.10.0.3. Is there any official update on this build error? Is a fix planned? Does this affect also online Azure builds as well?

orwo1 avatar Jan 15 '23 08:01 orwo1

Same issue

evgenyvalavin avatar Apr 24 '23 13:04 evgenyvalavin

Problem: I'm not sure what Firebase.CloudMessaging is; but I think that the issue has nothing to do with that NuGet package. The issue is very likely a long/max-path problem.

Verification: Open PowerShell in Windows, and run the following:

'C:\Users\RBTG.nuget\packages\xamarin.firebase.ios.installations\8.10.0.1\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_i386_x86_64-simulator\FirebaseInstallations.framework\Headers\FirebaseInstallations-umbrella.h'.Length;

NOTE: The results is ~263, while max-path is 260; therefore, it's at least 3 characters too long.

Solution:

  • I don't know.
  • I think that at least NuGet/etc should really fix this issue; the error messages are often confusing/misleading -- wrong.
  • I also think that Windows should simply address this max-path issue properly -- e.g. removing the limit, by default; or whatever makes sense..
  • Maybe it is already fixed; can't confirm at the moment.

Workaround:

  • C:\Users\RBTG.nuget\ is controlled by you.
  • Reduce it by 3+ characters.
  • For example, try: C:\src\RBTG\.

Emeka-MSFT avatar May 01 '23 04:05 Emeka-MSFT

same issue with 8.10.0.[1-3] but works with 8.10.0

antiGithub avatar Jun 08 '23 19:06 antiGithub

same issue with 8.10.0.[1-3] but works with 8.10.0

I also faced this problem, but now I am using .net7-ios, it doesn't accept 8.10.0

I spent a lot of time but still can't solve this problem

huy-buidoanquang avatar Oct 28 '23 04:10 huy-buidoanquang

The problem is nuget package manager and the limited path length. Old problem. As a workaround set a environment variable: NUGET_PACKAGES with value c:\nuget and restart Visual Studio.

This option was the solution for my case. Thanks!

Kelvyn14 avatar Nov 01 '23 14:11 Kelvyn14

#639

IeuanWalker avatar Dec 13 '23 18:12 IeuanWalker

I ended up adding nuget.config into solution folder with this content -

<add key="globalPackagesFolder" value="c:\temp" />

It fixed the issue, where path to nuget component was too long for windows to handle.

This definitely helped! Thanks

Juansero29 avatar Jan 09 '24 18:01 Juansero29

Setting NUGET_PACKAGES env variable to C:\nuget helped with the FirebaseInstallations-umbrella.h, but it only went to this file and then broke again, and this file is 266 chars in length so no way to fit under 260 chars limit:

'c:\nuget\xamarin.firebase.ios.cloudfirestore\8.10.0.3\lib\xamarinios10\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h'.

Has anyone tried LongPathsEnabled registry setting?

nine-2-five avatar Feb 11 '24 20:02 nine-2-five