Cannot deploy to Google App Engine due to bad import, not in my code - google-app-engine-go

I am trying to deploy an application to Google AppEngine using the beta deploy command: gcloud beta app deploy app.yaml and I have even tried to add: --verbosity=info to get more information.
Nevertheless I keep getting this error:
Failed parsing input: parser: bad import "unsafe" in golang.org/x/sys/unix/dirent.go
From what I can tell the error does not come from my code and the only external libraries I use is
gorilla/mux
sirupsen/logrus
Which from what I can tell also do not use any unsafe code. My local go version is go version go1.8.3 linux/amd64 and I am using a standard environment on Google AppEngine.
Furthermore, locally the code runs as it should.
Any ideas on what might be wrong?

The github.com/sirupsen/logrus package is using the golang.org/x/sys/unix package.
See: https://github.com/sirupsen/logrus/search?q=unix&type=Code
You can't use on Google AppEngine standard any package that uses unsafe or imports other package that use it.

Related

Use Of experiments=no_use_multiple_sdk_containers in Google cloud dataflow

Issue Summary:
Hi,
I am using avro version 1.11.0 for parsing an avro file and decoding it. We have a custom requirement, so i am not able to use ReadFromAvro. When trying this with dataflow there arises a dependency issues as avro-python3 with version 1.82 is already available. The issue is of class TimestampMillisSchema which is not present in avro-python3. It fails stating Attribute TimestampMillisSchema not found in avro.schema. I then tried passing a requirements file with avro==1.11.0 but now the dataflow was not able to start giving error "Error syncing pod" which seems to be because of dependencies conflicts.
To Solve the issue , we set an experiment flag (--experiments=no_use_multiple_sdk_containers ) which ran fine.
I want to know a better solution of my issue and also does the above flag will effect the pipeline performance.
Please try with the dataflow run command:
--prebuild_sdk_container_engine=cloud_build --experiments=use_runner_v2
this would use cloud build to build the container with your extra dependencies and then would use it within the dataflow run.

How to show stack trace with aws cdk synth/deploy

So I'm a cdk and typescipt beginner.
After successfully deploying a couple of stacks I'm not getting the following error with cdk synth: Unexpected token export. Subprocess exited with error 1.
I'm less interested in solving this issue and more interested to where the stack trace is, or any kind of additional info about the error. Doing a --trace or -v does not really provide much helpful info.
Any ideas how I can obtain such information????
What happened behind the scene is that CDK converts to stack into a cloudformation template and saves it into S3 - The S3 bucket created when running cdk bootstrap(More info here).
When you run cdk synth, CDK trying to convert the code ( in your case typescript) into cloudformation stack. this error: Unexpected token export. could be since async call that didn't end, in addition, this error means that your code could not be transferred into cloudformation stack, but it doesn't mean your "cdk" code is broke.
When you run cdk deploy cdk compare the transferred template with the S3 template. And deploy only the diffs.
Update:
Yesterday DevopsStart publish new article about debuuging cdk in vs code.
This might be helpful.
CDK Debugging in VSCode.
I believe the issue is because npx is used to run ts-node under the hood and npx appears to swallow the stack as described here.
One work around is add a try/catch block, e.g.
try {
main()
} catch (e) {
console.log(e)
throw e
}
So I think this is being caused by some javascript (yours or possibly in an imported module) that is using ESM export syntax.
This confused me a little at first because I'm using import/export syntax all over my project however the project is written in typescript which means that it's being compiled to javascript before execution and most likely all of these ESM statements are being emitted in CJS syntax. I however was also using lodash-es because I preferred the import syntax. This module internally uses ESM syntax in javascript and as such this is interpreted directly by the node runtime. Modern versions of node can use ESM syntax however only under specific package configs which mine did not have. My solution was just to remove the offending package however you may be able to go the other direction and configure your package.json such that ESM is enabled in node. This may also require your tsconfig.json to be updated such that the typescript compiler also emits ESM.
https://nodejs.org/api/esm.html
Passing --debug flag helped me.
cdk synth --debug

Unable to run 'tcl' file on Vivado 2016.4 version

I am trying to run a .tcl file originally configured for 2014.4 on 2016.4 version of Vivado. However I am getting the following error:
while executing
"create_bd_cell -type ip -vlnv xilinx.com:ip:mig mig_0 "
(procedure "create_root_design" line 111)
invoked from within
"create_root_design """
(file "all.tcl" line 405)
The tcl file uses the part 'xcku040-ffva1156-2' and tries to access the IP 'mig' which I believe is renamed/changed on later versions. Is there any workaround for this?
Steps I have done till now:
Changed the version number to 2016.4
tried replacing target boards.
tried on the same board with an alternate IP for mig.
tried on both 2016.4 and 2015.4 versions
None of these have worked so far
Attaching the '.tcl' file for reference : all.tcl
Since with every version upgrade of the Vivado Design Suite, parts are renamed or removed, it is not possible to run a .tcl file meant for an earlier version in newer releases. So I ran the above query on Xilinx Community Forums and found a workaround:
Run this script on the previous version(2014 in this case), generate the design and then open the same design using the next major release(2015 version). The 2015 version will automatically suggest upgrades to the discontinued/renamed IPs. Repeat the same to get to 2016 version. That's the only way to get this done. Also have to keep checking if the core functionality of the IP is the same after automated upgrades by Vivado Design Suite.

Undefined is not an object (evaluating RNRandomBytes.seed)

Long story short, I'm trying to develop an iOS app using React-Native for the front-end and MySQL for the back.
After installing the mysql module and install rn-nodeify, I wastold that I'm missing module A. After installing module A and reloading, I am missing B. After B, then C, etc etc etc. After getting past the modules, I get this error:
undefined is not an object (evaluating RNRandomBytes.seed)
Then, I installed RNPM and ran "rnpm link. Now, my app will not build and shows this error.
Am I doing something that is just fundamentally wrong, or is it this much of a pain to install the mysql module?
This also happened to me when I tried PostgreSQL.
Am I doing something that is just fundamentally wrong, or is it this much of a pain to install the mysql module? (This also happened to me when I tried PostgreSQL)
Maybe. React Native should be though of as purely client code. Similarly to how you would separate your web code from backend code.
The MySQL node module is designed to run in Node. Node is separate environment. Generally you can use one package.json file and one node_modules directory for both your server side and client code. As long as your careful not to import server code, i.e. code designed to run in node, into your client code.
Sometimes you run into versioning problems and it's best to have a separate directory with separate package.json file for the server code.
If I still don't understand your setup. Please update your question to include your directory structure, where you're calling the mysql module, and how you are running that script.
So it looks like I was doing something very fundamentally wrong. I was completely missing the middleman that is a backend server (lol). I have set up an Express server to interact with the database and have gotten it working.

Error while running pub deploy: Cannot read link

I'm trying to run pub deploy command in my Dart project, but it always ends with this error: "Pub deploy failed, [1] Cannot read link". No more information outputs into console.
I tried to run it in basic Dart browser project (the one with text reversing), but same error occurred again.
Did anyone have same problem? Any ideas how to fix it?
I have the same issue.
In my case, the Dart project is stored in NTFS hard drive (I share it with Windows OS) and Dart deploy (run from Eclipse) runs on Ubuntu.
Simply move the Dart project to Ubuntu hard drive then things come back to normal.
GS
This is probably a problem with the packages symlinks. If you delete them and run pub install it should work again.
According to dart-sdk/lib/io/link.dart:
On the Windows platform, the link will be created as a Junction
On other platforms, the posix symlink() call is used to make a symbolic link
On Linux platforms, storing Dart project in NTFS drive causes Pub to fail. Because posix symlink() is used on NTFS partition and doesn't create a valid NTFS junction point.
The solution is to move the project folder to a partition that uses posix symlinks natively, such as one formatted to ext4.

Resources