Google App Engine Python Upload Error - android

I am not sure why I am getting this error when trying to deploy my Python API via the Google App Engine Launcher.
Any Ideas what it is that I have going on here? Below is the error and my associated App.yaml file.
appcfg.py: error: Error parsing C:\Users\MYNAME\Desktop\Workspace\Imhotep\Imhotep\app.yaml: while parsing a block mapping
in "C:\Users\MYNAME\Desktop\Workspace\Imhotep\Imhotep\app.yaml", line 1, column 1
expected <block end>, but found '<block sequence start>'
in "C:\Users\MYNAME\Desktop\Workspace\Imhotep\Imhotep\app.yaml", line 14, column 2.
2013-11-17 20:37:33 (Process exited with code 2)
application: <IHAVEMYAPPIDHERE - PROVIDED BY GAE>
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
# Static assets
- url: /images
static_dir: static/images
# Endpoints handler
- url: /_ah/spi/.*
script: imhotep_api.APPLICATION

Whitespace is important in yaml files.
It looks like there's an extra space in front of the 2nd url line.
I'm not sure if the extra blank lines cause problems.
Oh, and if you're having problems deploying, it probably means you should have tested locally first.

I just noticed that in all of my app.yaml files threadsafe is set to 'yes' and not 'true'. Also, possibly more importantly, I have never seen the '.APPLICATION' extension in a .yaml file. In all of mine, and all the .yaml's I have seen it is '.app'.
Ex: script: imhotep_api.app
sorry if that's of no help.

Related

Get --dart-define environment variables in native iOS and Android

I am trying to find a way to access the environment variables provided by --dart-define inside native iOS and Android code.
Is there any way to do this?
I have tried the guide explained in https://binary-studio.com/2020/06/23/flutter-3/ but that doesn't work as what gets written to the generated .xcconfig is not separated by = but instead by %3D. And I get the error
error: .../ios/Flutter/DEFINEEnvironment.xcconfig:2: expected a ‘=’, but found % (in target 'Runner' from project 'Runner')
The file DEFINEEnvironment.xcconfig gets generated with the following content MY_VAR%3DMY_VALUE instead of MY_VAR=MY_VALUE
UPDATE
This seems to be happening because when reading from the args passed to --dart-define it must be encoding = into %3D. And I don't know how prevent that from happening
It seems that the script has been changed and now includes the necessary code to decode the strings.
The post-action script that needs to be added to Scheme is:
function urldecode() { : "${*//+/ }"; echo "${_//%/\\x}"; }
IFS=',' read -r -a define_items <<< "$DART_DEFINES"
for index in "${!define_items[#]}"
do
define_items[$index]=$(urldecode "${define_items[$index]}");
done
printf "%s\n" "${define_items[#]}" > ${SRCROOT}/Flutter/DEFINEEnvironment.xcconfig

`arc` fails to parse appium.txt file, failing out at the first line

I'm trying to set up a local test rig for Appium before trying some cloud services. I've got the Appium.app running locally and have put together a very small test script in Ruby (using xpath). I'm trying to utilize arc (the Appium Ruby Console) to do some further scripting but am having trouble getting it launched. I've got everything installed (appium_lib, appium_console) and best I can tell it should be working. However, when I run the arc command at the terminal, I get the following error:
Failed to match sequence (ALL_SPACE (TABLE / TABLE_ARRAY / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 1 char 1.
`- Don't know what to do with "[caps]\n " at line 1 char 1.
Here are the contents of my appium.txt as of now.
[caps]
appium-version: '1.0',
platformName: 'Android',
platformVersion: '4.4',
deviceName: 'Nexus_5_API_22_Lollipop',
app: '/Users/justinr/Desktop/Development/TMSampleAndroid-master/app-debug.apk',
appPackage => 'com.marketlytics.calabashtest',
appActivity => 'com.marketlytics.calabashtest.MainActivity'
Thanks a ton in advance for any insight - please let me know if there are other useful files to see.
Running the arc setup android got this working for me (it stumps an appium.txt in the current directory). Still not sure what the problem with my original file was, though - I can't see any key differences.

"Error: Unexpected close tag" Cordova/PhoneGap

When running the command cordova platform add android, I get a bunch of errors popping up in the terminal.
Caelans-MBP:HiltonExtraordinaryFB Caelan$ cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.phonegap.hiltonsimplyfb
Name: Hilton F&B
Android target: android-19
Copying template files...
Project successfully created.
Error: Unexpected close tag
Line: 8
Column: 12
Char: >
at error (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8)
at strictFail (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:364:22)
at closeTag (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:523:7)
at Object.write (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/node_modules/sax/lib/sax.js:948:29)
at XMLParser.feed (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/elementtree.js:263:10)
at Object.exports.XML (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/elementtree/lib/elementtree.js:593:13)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:126:38)
at android_parser.update_from_config (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:221:23)
at android_parser.update_project (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:349:14)
Caelans-MBP:HiltonExtraordinaryFB Caelan$
Is there any way I can resolve these errors so I can continue.
Without seeing your config.xml file it's hard to troubleshoot, but I'll bet it's the name of your app:
Name: Hilton F&B
Since config.xml must be valid XML, make sure you're using the & ampersand entity and not a raw ampersand, which has meaning in XML syntax.
I also had the same issue and wanted to share my experience. The problem was Unexpected close tag, in your config.xml file you forgot to close one or two tags, if you look at the line which is shown as error, there is not error even, but somewhre in your config.xml file there is tag not closed. Please, make sure all tags have closed correctly.
In my case, I was missing one closing tag in the string that I was parsing to XML. It had a starting tag not closing tag.
Make sure to check all the Tags have starting and closing tags.
If you have XML on runtime and cannot be checked manually, You can use an amazing npm package which provide validate method to check if XML is valid.
npm link: https://www.npmjs.com/package/fast-xml-parser
example:
const { XMLValidator } = require('fast-xml-parser');
const result = XMLValidator.validate(
"<root>Run the , ...' >/etc/hosts.allow where each <net>/<mask> combination (for example, '192.168.1.0/255.255.255.0') represents one network block in use by your organization that requires access to this system</root>",
{
allowBooleanAttributes: true,
}
);
Just sharing, might be helpful for someone.

Porting cURL to Android with NDK

Good day to you. I'm currently struggling at porting cURL onto my Android app - many subjects do talk about this, but no single post or tutorial or whatever does clearly say what to do or just don't work at all.
I do own every single tool needed, have the latest version of cURL (7.28.0). I tried to do it using cross-compiling and a toolchain (part that work good) but when I'm trying to configure the curl-7.28.0, the ./configure --host=arm-linux-androideabi (or any argument that is pass) return the following error :
./configure: line 20: $'\r' : unknown command
./configure: line 35: Syntax error near unexpected token « newline »
'/configure: line 35: ` ;;
If someone had already gone through this and does have the memories of the steps he followed or knows what I do wrong, it would be a blessing if you could help my poor soul !
Thanks in advance.
Note : I'm using Cygwin.
Since you are using Cygwin, I suspect that you have tonj convert all the newlines to the windows format for it to work:
It seems that configure has only \r, or so called "carriage returns", as new line character. This is actually the notation used by OSX. Most *nixes use just a single newline character to work (\n). Only windows needs both: a "carriage return" and a newline character: e.g. \r\n.
You can use any professional text editor to change this, for example notepad++.
Looks like a newline issue in whatever file configure is reading. On Windows, lines in text files are terminated with CR/LF (\r\n) - many Unixy tools choke on that.
Visual Studio, among other tools, can recode line termination. Open a file, File\Advanced Save Options, choose Unix line format, then save.
On *nix there's a tool called dos2unix that does the same.

Cannot compile system app (Phone) using maven - EventLogTags cannot be resolved

this is related to my previous question. I'm trying to build Phone application from android 4.0.4 using maven (I'm adding framework_intermediates as dependency, so internal apis problems are solved), and I ran into this problem. Some parts of the logs are as follows:
Phone/src/com/android/phone/CallNotifier.java:[601,32] cannot find symbol
symbol : variable EventLogTags
(the corresponding line in CallNotifier.java is: EventLog.writeEvent(EventLogTags.PHONE_UI_MULTIPLE_QUERY); )
Phone/src/com/android/phone/InCallScreen.java:[723,28] cannot find symbol
symbol : variable EventLogTags
(the corresponding line in InCallScreen.java is: EventLog.writeEvent(EventLogTags.PHONE_UI_ENTER); )
So... it cannot find the class EventLogTags. There is actually a file Phone/src/com/android/phone/EventLogTags.logtags which has the following contents:
# See system/core/logcat/event.logtags for a description of the format of this file.
option java_package com.android.phone;
70301 phone_ui_enter
70302 phone_ui_exit
70303 phone_ui_button_click (text|3)
70304 phone_ui_ringer_query_elapsed
70305 phone_ui_multiple_query
Apparently, this file tells the system to use some particular tags to log important events in the system. I did a full grep, but could not find any file which defines the values PHONE_UI_ENTER, PHONE_UI_MULTIPLE_QUERY, etc. These are just logs, so I could just comment out these and get it working. But I don't want to do this because I need to build this inside the entire aosp later on. So my question is, how do I get this to compile using maven, without modifying any file?
The Android build system code-generates a Java class out of .logtags files if needed. See: https://github.com/android/platform_build/blob/master/core/base_rules.mk
You will need to decipher the make rules and run that code generation yourself, I imagine.

Categories

Resources