Installing Chrome with Playwright on Google Cloud Run for Python - google-cloud-run

I'm getting a Executable doesn't exist at /root/.cache/ms-playwright/chromium-1019/chromium-1019/chrome-linux/chrome error on Google Cloud Run whenever I try to install Playwright for Python, and I can't find a workaround for it, already tried to download and install a Chrome version but I don't know who to set the path to it.
Was anyone able to achieve this?

Related

Buildozer not using correct kivy version when packaging for android

I am having a couple of problems packaging my Kivy app for android which may, or may not be related:
The only packages my app imports other than Kivy, are the time, and math modules. When I add either or both of them to the requirements in the buildozer spec file, I get a "pip._internal.exceptions.DistributionNotFound: No matching distribution for time." error. When I don't include them in my requirements, the build is successful, but crashes upon open with the error:
"Exception: The version of Kivy installed on this system is too old. (You have 1.11.1, but the application requires 2.0.0)"
I am doing the install in a VirutalBox on Ubuntu, and have followed the installation procedure outlined in the Kivy, and Buildozer documentation, as well as following a tutorial by Eric Sandberg on YouTube. I have set the Kivy version in the buildozer spec file, and installed Kivy 2.0.0 on the VM using pip. When I pip freeze, it shows the correct version of Kivy. One thing I have noticed is the when I try and install it with "apt-get install python3-kivy", it says kivy 1.10 is installed and that this is the most up to date version.
This seems like an easy problem to address but I have cannot figure out why it is trying to use this version of Kivy! Please let me know if any other information is required to debug. The spec file is hardly changed, other then specifying Kivy=2.0.0 in requirements.
Here are the logs:
Here are the requirements:
You don't have to add math and time in requirements of your buildozer.spec file as they are inbuild modules in python. So, they will automatically get added when you add python3 in your requirements.
To use a newer versio version of kivy you have to specify it in your requirements. In requirements you have to add like requirements=python3,kivy==2.0.0rc4 or any other version you want to use. Also, after changing requirements you might have to rebuild you package. You have to delete .buildozer directory and again run the buildozer using buildozer android debug deploy run

VS Code-'dart' is not recognized as an internal or external command, operable program or batch file

I am trying to install flutter and run the basic flutter example on visual studio code . I used flutter doctor in the command line and installed all the missing requirements , now i try to run a basic program in flutter ,but in visual studio code output i get the following error
[Running] dart "c:\fluttercode\mobile_test1\lib\main.dart"
'dart' is not recognized as an internal or external command,
operable program or batch file.
[Done] exited with code=1 in 64.965 seconds
I could find only one question similar to this in stack overflow ,
Visual Studio Code: dart not found
they told to change environment variables ,i added the environment variables (however the name of the environment variables was not mentioned in the answer )
I checked the dart site in case they mentioned it ,but i couldn't find anything related to the name of the environment variable
This is what i got from dart site
Windows:
In Windows, setting your PATH and environment variables can be done by opening Control Panel and typing “Environment” and then clicking the “Edit the system environment variables” option. You’ll be presented with a list of environment variables including PATH where you can edit or add new ones.
Note: You should reboot your computer after making changes to PATH to ensure all processes (including explorer) are updated.
So i just did a guess and added an environment variable with the name FLUTTER_ROOT(cause i remember reading somewhere in one of the settings in VS Code for dart ,this name was used) and pointed it to my flutter bin directory
I restarted my PC and opened vs code and changed in VS Settings >user settings>dart and flutter>Dart:Env and updated my path
{
"files.autoSave": "afterDelay",
"dart.flutterSdkPath": "C:\\src\\flutter\\bin"
}
But i get the same error
this is how my flutter bin folder looks like
Environment variables in PATH after installing Dart
You don't have to install the dart SDK if you already have the flutter SDK installed. When you specify the path of flutter, VSCode only recognizes the flutter commands and not the dart commands. What you should do is change the system environment variables (type env in the windows search bar) and add the dart sdk inside the PATH variable. The dart sdk is usually found inside /bin/cache/dart/bin. This worked for me, so give it a try
Try to add the flutter\bin sdk path and also the windows\system32 path to the user variables and/or system variables.
I had the same problem. Here is how I resolved it.
Download and extract dart sdk (I used the stable release)
https://v1-dartlang-org.firebaseapp.com/install/archive
add the dart sdk bin folder to your path
after you have added it to your path run
flutter pub global activate webdev
now i can run
webdev serve
without error.
I'm using windows so I used choco install dart-sdk -<version> to install dart through the powershell in admin mode. That got rid of my error
Installing flutter is not enough. You need to install the dart sdk.
Pre-req: Make sure you have Chocolatey installed on your machine.
Run "choco install dart-sdk" from an elevated prompt.
Restart vscode.
That did it for me.
I went to the dart website and searched for the dart sdk.
i then chose the option to install dart using setup wizard.
After running the executable file on my laptop it took some time to download all the files but once the setup was complete the error no longer occurred and i was able to run the code successfully.
Downloading dart setup from dart website
Installing using setup wizard

Unable to determine Electron version. Please specify an Electron version

I was trying to create executable file for electron app but faced this issue
Unable to determine Electron version. Please specify an Electron version
Though I have electron installed on my machine globally but still it was giving me error.
Install electron as dev-dependency to resolve this issue
npm install --save-dev electron
Resources
https://github.com/electron-userland/electron-packager/issues/617

Install version cordova-ios 4.3.0 for visual studio and issue with cordova command not existing in CLI

Someone has asked the exact question I need on this page.
However, as I am new, my rep will not allow me to comment yet! So I have had to create a new question.
A guy in the question linked above suggests to "Type cordova platform add ios;". So there I suppose is where my question is different.
When I type Cordova in cmd prompt, I get a message saying "cordova is not recognized as an internal or external command, operable program or batch file."
Update: Please note, I have followed these steps: http://cordova.apache.org/docs/en/7.x/guide/cli/ And I am able to run the npm commands in CLI. I was hoping to simply update my ios version only.
I have also looked up PATH but I have no idea where to start, problem is, people suggest that I shouldn't need to adjust PATH as running the CLI commands to install the Cordova CLI should just allow me to use it?
So to summarize:
I downloaded the node.js and installed it
I typed this into cmd "npm install -g cordova" which installed
I type "cordova" and get my "cordova is not recognized as an internal or external command" message above
My aim is to upgrade my cordova-ios 4.2.0 to cordova-ios 4.3.0 to fix my main error of "remote build requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3"
Update 2 9th oct 2017:
I have given up for now with the above, to work around this i installed Node.js 8.6.0 then updated cordova using npm... im now facing some more issues that I am again stuck on and will create a new question.
Hopefully in the meantime, someone can answer this question and i can try again.
I suspect my issues could be relating to the fact i installed VS 2017 and used all the built in nuget packages (for cordova and node.js) and they are conflicting with the manual way in some way (i suspect that, as running the "cordova" command on my other PC worked fine!)

ASP.NET 5 and Yeoman genetaror issue

First of all I looked into [this][1] post for possible workaround but unfortunately there is none.
My issue is somewhat closer but steps I went through are different so I decided to put up my question in a new thread.
My requirements were:
Installing ASP.NET 5 but I did not want to install full VS 2015 rather I went for DNVM (Dot Net Version Manager) and DNX (NET Execution Environment). This post says we can install from Command Line tool so I used this.
Installing Code for Visual Studio which I did
Installing a aspnet-generator using yo which I did using the following command: npm install -g yo generator-aspnet but ended up with some error messages. Please see screenshot below:
Even I got above errors I went on and ran yo aspnet which was supposed to give me choice of what type of application I want to create etc. But here I ended up with errors again. Please see screenshot below:
I googled a lot but nothing looked suitable or closer to my issue. I don't want to play with Windows Registry.
I am completely screwed up with this problem :( Somebody please show me the right path and help me out of this stand-still situation.
Thank you
This is unfortunately a bug with npm. Here is the usual troubleshoot:
Make sure you're on the latest npm version
Delete the node_modules folders and retry installation
If this doesn't fix it, then you should open an issue on the npm bug tracker.

Resources