shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.31k stars 140 forks source link

fix: shorebird fails when run from relative path on Windows #1371

Closed eseidel closed 1 year ago

eseidel commented 1 year ago
PS C:\Users\micro\Documents\GitHub\samples> ..\shorebird\bin\shorebird upgrade
Get-Content : Cannot find path 'C:\Users\micro\Documents\GitHub\shorebird\packages\shorebird_cli\internal\flutter.version' because it does not exist.
At C:\Users\micro\Documents\GitHub\shorebird\bin\shorebird.ps1:15 char:20
+ ... r_version = Get-Content "$shorebird_cli_dir\internal\flutter.version" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\micro\...flutter.version:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

remote: Enumerating objects: 1655, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 1655 (delta 22), reused 17 (delta 17), pack-reused 1627
Receiving objects: 100% (1655/1655), 1.15 MiB | 15.90 MiB/s, done.
Resolving deltas: 100% (434/434), done.
From https://github.com/shorebirdtech/flutter
   9a344c26..8576da53  master                 -> origin/master
   58dff390..83305b50  codepush               -> origin/codepush
 + d6260f12...0fc414cb dev                    -> origin/dev  (forced update)
 * [new branch]        fixing_android         -> origin/fixing_android
 * [new branch]        flutter_release/3.10.0 -> origin/flutter_release/3.10.0
 * [new branch]        flutter_release/3.10.1 -> origin/flutter_release/3.10.1
 * [new branch]        flutter_release/3.10.2 -> origin/flutter_release/3.10.2
 * [new branch]        flutter_release/3.10.3 -> origin/flutter_release/3.10.3
 * [new branch]        flutter_release/3.10.4 -> origin/flutter_release/3.10.4
 * [new branch]        flutter_release/3.10.5 -> origin/flutter_release/3.10.5
 * [new branch]        flutter_release/3.10.6 -> origin/flutter_release/3.10.6
 * [new branch]        flutter_release/3.13.0 -> origin/flutter_release/3.13.0
 * [new branch]        flutter_release/3.13.1 -> origin/flutter_release/3.13.1
 * [new branch]        flutter_release/3.13.2 -> origin/flutter_release/3.13.2
 * [new branch]        flutter_release/3.13.3 -> origin/flutter_release/3.13.3
 * [new branch]        flutter_release/3.13.4 -> origin/flutter_release/3.13.4
 * [new branch]        flutter_release/3.13.5 -> origin/flutter_release/3.13.5
 * [new branch]        flutter_release/3.13.6 -> origin/flutter_release/3.13.6
error: cannot lock ref 'refs/remotes/origin/shorebird/3_13_0': 'refs/remotes/origin/shorebird' exists; cannot create 'refs/remotes/origin/shorebird/3_13_0'
 ! [new branch]        shorebird/3_13_0       -> origin/shorebird/3_13_0  (unable to update local ref)
error: cannot lock ref 'refs/remotes/origin/shorebird/dev': 'refs/remotes/origin/shorebird' exists; cannot create 'refs/remotes/origin/shorebird/dev'
 ! [new branch]        shorebird/dev          -> origin/shorebird/dev  (unable to update local ref)
   45fc514f..ad339a4b  stable                 -> origin/stable
 * [new branch]        test/ios-crash-fix     -> origin/test/ios-crash-fix
 * [new tag]           3.7.10                 -> 3.7.10
 * [new tag]           3.7.11                 -> 3.7.11
 * [new tag]           3.7.12                 -> 3.7.12
 * [new tag]           remove.1.2.3           -> remove.1.2.3
Your branch is behind 'origin/master' by 904 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Checking Dart SDK version... 
Downloading Dart SDK from Flutter engine ... 
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : Failed to fetch manifest for 013e936fee7b0cba69126faea3c2096e0d3e2eed
Exception: Failed to fetch artifacts manifest for revision 013e936fee7b0cba69126faea3c2096e0d3e2eed.
404 Not Found
At C:\Users\micro\Documents\GitHub\shorebird\bin\cache\flutter\bin\internal\update_dart_sdk.ps1:70 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: Unable to update Dart SDK. Retrying... 

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version... 
Downloading Dart SDK from Flutter engine ... 
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : Failed to fetch manifest for 013e936fee7b0cba69126faea3c2096e0d3e2eed
Exception: Failed to fetch artifacts manifest for revision 013e936fee7b0cba69126faea3c2096e0d3e2eed.
404 Not Found
At C:\Users\micro\Documents\GitHub\shorebird\bin\cache\flutter\bin\internal\update_dart_sdk.ps1:70 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: Unable to update Dart SDK. Retrying... 

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version... 
Downloading Dart SDK from Flutter engine ... 
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : Failed to fetch manifest for 013e936fee7b0cba69126faea3c2096e0d3e2eed
Exception: Failed to fetch artifacts manifest for revision 013e936fee7b0cba69126faea3c2096e0d3e2eed.
404 Not Found
At C:\Users\micro\Documents\GitHub\shorebird\bin\cache\flutter\bin\internal\update_dart_sdk.ps1:70 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: Unable to update Dart SDK. Retrying... 
eseidel commented 1 year ago

It seems to fail with absolute path too?


PS C:\Users\micro\Documents\GitHub\samples> C:\Users\micro\Documents\GitHub\shorebird\bin\shorebird.ps1    
Get-Content : Cannot find path 'C:\Users\micro\Documents\GitHub\shorebird\packages\shorebird_cli\internal\flutter.version' because it does not exist.
At C:\Users\micro\Documents\GitHub\shorebird\bin\shorebird.ps1:15 char:20
+ ... r_version = Get-Content "$shorebird_cli_dir\internal\flutter.version" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\micro\...flutter.version:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

error: cannot lock ref 'refs/remotes/origin/shorebird/3_13_0': 'refs/remotes/origin/shorebird' exists; cannot create 'refs/remotes/origin/shorebird/3_13_0'
From https://github.com/shorebirdtech/flutter
 ! [new branch]        shorebird/3_13_0 -> origin/shorebird/3_13_0  (unable to update local ref)
error: cannot lock ref 'refs/remotes/origin/shorebird/dev': 'refs/remotes/origin/shorebird' exists; cannot create 'refs/remotes/origin/shorebird/dev'
 ! [new branch]        shorebird/dev    -> origin/shorebird/dev  (unable to update local ref)
 * [new tag]           3.10.0           -> 3.10.0
 * [new tag]           3.10.0-1.0.pre   -> 3.10.0-1.0.pre
 * [new tag]           3.10.0-1.1.pre   -> 3.10.0-1.1.pre
 * [new tag]           3.10.0-1.2.pre   -> 3.10.0-1.2.pre
 * [new tag]           3.10.0-1.3.pre   -> 3.10.0-1.3.pre
 * [new tag]           3.10.0-1.4.pre   -> 3.10.0-1.4.pre
 * [new tag]           3.10.0-1.5.pre   -> 3.10.0-1.5.pre
 * [new tag]           3.10.0-11.0.pre  -> 3.10.0-11.0.pre
 * [new tag]           3.10.0-13.0.pre  -> 3.10.0-13.0.pre
 * [new tag]           3.10.0-14.0.pre  -> 3.10.0-14.0.pre
 * [new tag]           3.10.0-15.0.pre  -> 3.10.0-15.0.pre
 * [new tag]           3.10.0-16.0.pre  -> 3.10.0-16.0.pre
 * [new tag]           3.10.0-17.0.pre  -> 3.10.0-17.0.pre
 * [new tag]           3.10.0-18.0.pre  -> 3.10.0-18.0.pre
 * [new tag]           3.10.0-2.0.pre   -> 3.10.0-2.0.pre
 * [new tag]           3.10.0-3.0.pre   -> 3.10.0-3.0.pre
 * [new tag]           3.10.0-4.0.pre   -> 3.10.0-4.0.pre
 * [new tag]           3.10.0-5.0.pre   -> 3.10.0-5.0.pre
 * [new tag]           3.10.0-6.0.pre   -> 3.10.0-6.0.pre
 * [new tag]           3.10.0-7.0.pre   -> 3.10.0-7.0.pre
 * [new tag]           3.10.0-8.0.pre   -> 3.10.0-8.0.pre
 * [new tag]           3.10.0-9.0.pre   -> 3.10.0-9.0.pre
 * [new tag]           3.10.1           -> 3.10.1
 * [new tag]           3.10.2           -> 3.10.2
 * [new tag]           3.10.3           -> 3.10.3
 * [new tag]           3.10.4           -> 3.10.4
 * [new tag]           3.10.5           -> 3.10.5
 * [new tag]           3.10.6           -> 3.10.6
 * [new tag]           3.11.0-0.0.pre   -> 3.11.0-0.0.pre
 * [new tag]           3.11.0-1.0.pre   -> 3.11.0-1.0.pre
 * [new tag]           3.11.0-10.0.pre  -> 3.11.0-10.0.pre
 * [new tag]           3.11.0-11.0.pre  -> 3.11.0-11.0.pre
 * [new tag]           3.11.0-12.0.pre  -> 3.11.0-12.0.pre
 * [new tag]           3.11.0-13.0.pre  -> 3.11.0-13.0.pre
 * [new tag]           3.11.0-14.0.pre  -> 3.11.0-14.0.pre
 * [new tag]           3.11.0-15.0.pre  -> 3.11.0-15.0.pre
 * [new tag]           3.11.0-17.0.pre  -> 3.11.0-17.0.pre
 * [new tag]           3.11.0-19.0.pre  -> 3.11.0-19.0.pre
 * [new tag]           3.11.0-4.0.pre   -> 3.11.0-4.0.pre
 * [new tag]           3.11.0-5.0.pre   -> 3.11.0-5.0.pre
 * [new tag]           3.11.0-9.0.pre   -> 3.11.0-9.0.pre
 * [new tag]           3.12.0-0.0.pre   -> 3.12.0-0.0.pre
 * [new tag]           3.12.0-1.0.pre   -> 3.12.0-1.0.pre
 * [new tag]           3.12.0-10.0.pre  -> 3.12.0-10.0.pre
 * [new tag]           3.12.0-11.0.pre  -> 3.12.0-11.0.pre
 * [new tag]           3.12.0-12.0.pre  -> 3.12.0-12.0.pre
 * [new tag]           3.12.0-13.0.pre  -> 3.12.0-13.0.pre
 * [new tag]           3.12.0-14.0.pre  -> 3.12.0-14.0.pre
 * [new tag]           3.12.0-2.0.pre   -> 3.12.0-2.0.pre
 * [new tag]           3.12.0-3.0.pre   -> 3.12.0-3.0.pre
 * [new tag]           3.12.0-6.0.pre   -> 3.12.0-6.0.pre
 * [new tag]           3.12.0-7.0.pre   -> 3.12.0-7.0.pre
 * [new tag]           3.12.0-8.0.pre   -> 3.12.0-8.0.pre
 * [new tag]           3.12.0-9.0.pre   -> 3.12.0-9.0.pre
 * [new tag]           3.13.0           -> 3.13.0
 * [new tag]           3.13.0-0.0.pre   -> 3.13.0-0.0.pre
 * [new tag]           3.13.0-0.1.pre   -> 3.13.0-0.1.pre
 * [new tag]           3.13.0-0.2.pre   -> 3.13.0-0.2.pre
 * [new tag]           3.13.0-0.3.pre   -> 3.13.0-0.3.pre
 * [new tag]           3.13.0-0.4.pre   -> 3.13.0-0.4.pre
 * [new tag]           3.13.1           -> 3.13.1
 * [new tag]           3.13.2           -> 3.13.2
 * [new tag]           3.13.3           -> 3.13.3
 * [new tag]           3.13.4           -> 3.13.4
 * [new tag]           3.13.5           -> 3.13.5
 * [new tag]           3.13.6           -> 3.13.6
 * [new tag]           3.9.0-20.0.pre   -> 3.9.0-20.0.pre
 * [new tag]           3.9.0-21.0.pre   -> 3.9.0-21.0.pre
Your branch is behind 'origin/master' by 904 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Checking Dart SDK version... 
Downloading Dart SDK from Flutter engine ... 
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : Failed to fetch manifest for 013e936fee7b0cba69126faea3c2096e0d3e2eed
Exception: Failed to fetch artifacts manifest for revision 013e936fee7b0cba69126faea3c2096e0d3e2eed.
404 Not Found
At C:\Users\micro\Documents\GitHub\shorebird\bin\cache\flutter\bin\internal\update_dart_sdk.ps1:70 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: Unable to update Dart SDK. Retrying... 

Waiting for 0 seconds, press CTRL+C to quit ...
Checking Dart SDK version... 
Downloading Dart SDK from Flutter engine ... 
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : Failed to fetch manifest for 013e936fee7b0cba69126faea3c2096e0d3e2eed
Exception: Failed to fetch artifacts manifest for revision 013e936fee7b0cba69126faea3c2096e0d3e2eed.
404 Not Found
At C:\Users\micro\Documents\GitHub\shorebird\bin\cache\flutter\bin\internal\update_dart_sdk.ps1:70 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: Unable to update Dart SDK. Retrying... 

Waiting for 1 seconds, press CTRL+C to quit ...
Terminate batch job (Y/N)? y```
eseidel commented 1 year ago

LOL. This was a checkout from april.