TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

Windows 11 MAUI App could not find part of the path error #199

Closed SteveSitekitcare closed 1 year ago

SteveSitekitcare commented 1 year ago

Hi all,

I have a MAUI app that uses dotnet 7. I seem to be having the problem mentioned in HERE

The problem is I've tried the fixes to enable long filename support in windows 11 but none seem to work. It may be related to THIS

The error occurs when trying to install the Plugin.Firebase nuget package

Could not find a part of the path '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

I tried the dotnet command and it didnt work either (I had enabled long filename support)

image

Does anyone have any ideas?

SteveSitekitcare commented 1 year ago

So I just tried it on a windows 10 machine and its fine, so this looks to be a windows 11 issue

Kirk-iOS commented 1 year ago

I too am having this issue on Windows 11. It appears there is an issue with long filenames on windows 11. @SteveSitekitcare did you find a solution to this or downgrade to Windows 10?

SteveSitekitcare commented 1 year ago

I too am having this issue on Windows 11. It appears there is an issue with long filenames on windows 11. @SteveSitekitcare did you find a solution to this or downgrade to Windows 10?

I had to use windows 10. I tried the environment variable to set the nuget path to c:\nuget and that still didnt give me enought space. The fixes that work for windows 10 (policy/registry) dont work on windows 11.

AdamEssenmacher commented 1 year ago

Try clearing your local nuget cache and running a nuget restore from command line (not from Visual Studio).

SteveSitekitcare commented 1 year ago

Try clearing your local nuget cache and running a nuget restore from command line (not from Visual Studio).

Setting the nuget path to c:\nuget in the Environement variables reset the nuget cache as it had to pull all the packages again

Tried it anyway and still the same issue image

ispysoftware commented 1 year ago

yeah something here is thoroughly broken - there's some unfixable limit on the path length on windows 11 that's preventing it from being installed. Removing path length limits in windows 11 doesn't seem to work.

edit: enabling long filename support and then installing it via the command line in the project directory seems to work

dotnet add package Plugin.Firebase

AdamEssenmacher commented 1 year ago

I don't think there's much this plugin's developers can do. The problem is that the Xamarin.Firebase.iOS Nuget packages are getting packed with long file paths, so the issue would probably be better reported over at https://github.com/xamarin/GoogleApisForiOSComponents

Even then, I don't know if there's anything the Xamarin devs will be able to do about it either. With iOS moving to xcframeworks to bundle multiplatform binaries, the resulting file paths are going to be longer than what Visual Studio is able to support.

I have been able to restore these packages on Windows 10 just fine on the command line and after clearing the local nuget cache. These packages will simply not work if they're restored via the Visual Studio IDE, which does not support long file paths and--by Microsoft's own statements--probably won't for the next 5-10 years.

AdamEssenmacher commented 1 year ago

it's probably better to leave it open until it's resolved.

To what end? The solution is well outside the scope of this project, and there's a known workaround.

SteveSitekitcare commented 1 year ago

Just wondering if anyone has tried this in Jetbrains Rider on windows?