Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android)(9_3_X): build fails if "app_name" is defined in i18n "strings.xml" as of 9.0.0 #11841

Merged
merged 5 commits into from
Oct 8, 2020

Conversation

jquick-axway
Copy link
Contributor

@jquick-axway jquick-axway commented Jul 24, 2020

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28027

Summary:
As of Titanium 9.0.0, a build failure will occur if you have an app_name entry defined in a "strings.xml" file under the "i18n" folder. This will cause a resource name collision since Titanium's build system will add an app_name entry from the i18n "app.xml" or "tiapp.xml" file.

Note:
This regression is low priority because it's using an undocumented approach to localize the app name. The official cross-platform way of localize the app name is via the i18n "app.xml" file as described below.
https://docs.appcelerator.com/platform/latest/#!/guide/Internationalization-section-src-29004892_Internationalization-Appnamelocalization

Test:

  1. Create a Classic Titanium app project.
  2. Add the below i18n XML files to the project.
  3. Build and run on Android.
  4. Verify app builds and runs successfully. (It used to fail.)
  5. Go to device's app list screen and verify name under icon is "app_name".
  6. Delete the app_name line from the "strings.xml" file.
  7. Build and run on Android.
  8. Go to device's app list screen and verify name under icon is "AppXmlName".
  9. Delete the "appname" line from the "app.xml" file.
  10. Build and run on Android.
  11. Go to app list screen and verify name under icon matches <name/> in "tiapp.xml".

./i18n/en/app.xml

<?xml version="1.0" encoding="UTF-8"?>
<resources>
	<string name="appname">AppXmlName</string>
</resources>

./i18n/en/strings.xml

<?xml version="1.0" encoding="UTF-8"?>
<resources>
	<string name="app_name">app_name</string>
	<string name="hello_world">Hello World</string>
</resources>

@build
Copy link
Contributor

build commented Jul 24, 2020

Fails
🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 14 tests have failed There are 14 tests failing and 977 skipped out of 10932 total tests.

Tests:

ClassnameNameTimeError
ios.ipad.Titanium.UI.iOS.CollisionBehavior.exampleworks (14.0)15
Error: timeout of 15000ms exceeded
file:///Users/build/Library/Developer/CoreSimulator/Devices/6C7D2BAE-178F-423C-B035-5B9A681D728F/data/Containers/Bundle/Application/114A0687-A9C4-436A-90A8-CE3A5FF85196/mocha.app/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Window.hidesBackButton (10.15.4)20.128
Error: timeout of 20000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.TabGroupadd Map.View to TabGroup (10.15.4)15.061
Error: timeout of 15000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4290:32
ios.macos.Titanium.UI.TableViewrow#rect (10.15.4)5.032
Error: timeout of 5000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.TextAreatextArea in tabGroup (10.15.4)7.562
Error: timeout of 7500ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4290:32
ios.macos.Titanium.UI.Viewanimate (height %) (10.15.4)10
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (width %) (10.15.4)10.028
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (top %) (10.15.4)10.048
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (left %) (10.15.4)10.05
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (left) (10.15.4)10.128
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (top) - autoreverse (10.15.4)10.067
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.Viewanimate (top) (10.15.4)10.135
Error: timeout of 10000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4326:27
ios.macos.Titanium.UI.View.borderRadius corners1 value with shadow effect (10.15.4)0.069
Error: expected 'Ti.UI.View' view to match snapshot image: snapshots/borderRadiusWithShadow30px.png
fail@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/node_modules/should/cjs/should.js:356:23
postlayout@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti.ui.view.test.js:1212:39
ios.macos.Titanium.Utils#base64encode() Ti.Blob#TYPE_DATA from Ti.UI.View.toImage() async (10.15.4)5.057
Error: timeout of 5000ms exceeded
file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-11841/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti-mocha.js:4290:32

Generated by 🚫 dangerJS against 1edc5c1

@jquick-axway jquick-axway changed the title fix(android): build fails if "app_name" is defined in i18n "strings.xml" as of 9.0.0 fix(android)(9_3_X): build fails if "app_name" is defined in i18n "strings.xml" as of 9.0.0 Jul 24, 2020
@jquick-axway jquick-axway added the backport master when applied, PRs with this label will get an auto-generated backport to master branch on merge label Sep 21, 2020
@ssekhri
Copy link

ssekhri commented Oct 7, 2020

FR Passed
Verified on:
Mac OS: 10.15.4
SDK: 9.3.0.v20200810181858
Appc CLI: 8.1.1
JDK: 11.0.4
Node: 10.17.0
Studio: 6.0.0.202005141803
Device: Pixel 3 XL(v11.0) emulator

@sgtcoolguy sgtcoolguy merged commit d8d442e into tidev:9_3_X Oct 8, 2020
@build build removed the backport master when applied, PRs with this label will get an auto-generated backport to master branch on merge label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants