Titanium Studio's new Alloy mobile project doesn't start - titanium-mobile

Just after installation of Titanium Studio (Build: jenkins-titanium-rcp-master-197 (origin/master) Date: 26 September 2014, 12:28:18) I created new Alloy mobile project and tried run it (Mobile Web Preview in Browser). Project doesn't execute, in console I see error:
...longjohn.js:185
throw e;
^
TypeError: Bad argument
at ChildProcess.spawn (child_process.js:880:24)
at exports.spawn (child_process.js:680:9)
at async.parallel.powershell (C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\titanium-sdk\lib\windows.js:385:14)
at C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:524:25
at C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:111:13
at Array.forEach (native)
at _each (C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:32:24)
at async.each (C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:110:9)
at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:523:20)
at async.parallel (C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\node_modules\async\lib\async.js:539:9)
I have Win7 x64, java 1.7 x86, node 0.10.13, ADT 23.0.2 I tried different versions of titaium sdk (3.3), node.js but nothing helps.
Please, help. What should I try additional things or should I report some more info?
Thanks

Suggested workaround:
On this line: https://github.com/appcelerator/titanium_mobile/blob/3_3_X/node_modules/titanium-sdk/lib/windows.js#L377
(likely in C:\ProgramData\Titanium\mobilesdk\win32\3.3.0.GA\node_modules\titanium-sdk\lib\windows.js)
Replace:
if (!selectedVisualStudio) return next();
with:
return next();
this workaround is taken from https://jira.appcelerator.org/browse/TIMOB-17411

Related

SQLite bad parameter or other API misuse

Error
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: SqliteException(14): bad parameter or other API misuse, bad parameter or other API misuse (code 21)
#0 new DatabaseImpl.open (package:sqlite3/src/impl/database.dart:53:7)
#1 Sqlite3.open (package:sqlite3/src/api/sqlite3.dart:51:25)
#2 _VmDelegate.open (package:moor/src/ffi/vm_database.dart:126:21)
#3 DelegatedDatabase.ensureOpen.<anonymous closure> (package:moor/src/runtime/executor/helpers/engines.dart:255:22)
<asynchronous suspension>
#4 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:34:18)
<asynchronous suspension>
#5 QueryEngine.doWhenOpened.<anonymous closure> (package:moor/src/runtime/api/query_engine.dart)
<asynchronous suspension>
Database path
C:\Users\fosan\Documents\db.sqlite
Environment
moor: ^3.4.0
sqlite3_flutter_libs: ^0.3.0
path_provider: ^1.6.24
path: ^1.7.0
build_runner: ^1.10.11
moor_generator: ^3.4.0
sqlite3.dll in project's root path - "Using sqlite3 Version(libVersion: 3.34.0, sourceId: 2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b, number: 3034000)"
Flutter doctor
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19613.1005],
locale pt-BR)
• Flutter version 1.26.0-1.0.pre at C:\tools\flutter
• Framework revision 63062a6443 (8 days ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\fosan\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.8.30804.86
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version
10.0.19613.1005]
• No issues found!
Code
import 'dart:ffi';
import 'dart:io';
...
import 'package:flutter/material.dart';
import 'package:sqlite3/open.dart';
import 'package:window_size/window_size.dart';
void main() {
open.overrideFor(OperatingSystem.windows, _openOnWindows);
...
runApp(const App(appName: appName));
}
DynamicLibrary _openOnWindows() {
final sqlite3LibraryPath = join(Platform.script.toFilePath(), 'sqlite3.dll');
return DynamicLibrary.open(sqlite3LibraryPath);
}
import 'dart:io';
import 'package:moor/ffi.dart';
import 'package:moor/moor.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
part 'local_database.g.dart';
#UseMoor(tables: [ClientsTable])
class LocalDatabase extends _$LocalDatabase {
LocalDatabase() : super(_openConnection());
#override
int get schemaVersion => 1;
Future<int> addClient(ClientRow newClient) =>
into(clientsTable).insert(newClient);
Stream<List<ClientRow>> get watchAllClients => select(clientsTable).watch();
Future<int> deleteClient(int id) =>
(delete(clientsTable)..where((tbl) => tbl.id.equals(id))).go();
}
LazyDatabase _openConnection() {
return LazyDatabase(() async {
final dbFolder = await getApplicationDocumentsDirectory();
final file = File(p.join(dbFolder.path, 'db.sqlite'));
return VmDatabase(file);
});
}
#DataClassName("ClientRow")
class ClientsTable extends Table {
IntColumn get id => integer().autoIncrement()();
TextColumn get name => text()();
TextColumn get phone => text()();
TextColumn get street => text()();
TextColumn get number => text()();
TextColumn get city => text()();
TextColumn get neighborhood => text()();
TextColumn get uf => text()();
TextColumn get reference => text()();
}
Should use sqflite: ^1.3.0 instead of sqlite3_flutter_libs: ^0.3.0
My problems were two things, both related to write permission. The first problem was that my application project was under the Desktop folder and the second one was that the await getApplicationDocumentsDirectory(); returned the Documents folder.
What solved for me was to create the database in the same folder of the project and to move to project folder itself to C:\StudioProjects
When SQLite throws an error, and you then try to use the same prepared statement again, without rebuilding it, SQLite will produce the General error: 21 bad parameter or other API misuse error. You must catch and rebuild the prepared statement from the start to avoid subsequent calls to a now invalid prepared statement stack. (By the way, the fact that this doesn't seg fault, deserves a round of applause to the SQLite devs. They did some awesome work here in a language that is very easy to make seg fault.) It should be noted that this will happen far more often in write statements (INSERT, UPDATE, DELETE, etc) where read only statements (SELECT) are much less likely to cause this error for showing up. So look at your write statements first.
Now anything can cause the error message from happening. My Googleing shows that this is happening in a lot of libraries that aren't handling folder permissions correctly or checking it at time of flight (when the query is actually being executed).
I ran into this problem head first when I was doing multiple INSERT statements one after the other, but the first statement poisoned the prepared statements due to a UNIQUE constraint resulting in subsequent statements giving me the General error: 21 bad parameter or other API misuse.

Pebble can't install app in any way - cloudpebble or command line

I've enjoyed developing simple apps for my pebble watch, but since yesterday I cannot install any new ones on my phone (I do have spare slots on pebble).
I've tried installing old (working) apps via cloudpebble portal, but I get following:
Saving
Compiling
Preparing to install app
Installation rejected. Check your phone for details.
(Phone message: There was an error trying to install the provided app.)
So I've tried installation through a command line:
$ pebble install --cloudpebble -vvvv
But this is the output:
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 209.118.208.39
DEBUG:pebble_tool.util.analytics:Queueing analytics data: {'platform': 'native_sdk', 'data': {}, 'event': 'invoke_command_install', 'identity': {'sdk_client_id': '93381446-f47e-4be5-bd4a-781af1f42c3a', 'user': u'55b8844a6638300025560100'}, 'sdk': {'project': {'sdk': u'3', 'is_watchface': True, 'type': 'native', 'uuid': '2737c550-fd8a-4e70-82be-1b887e5d7a4d', 'app_name': u'MoveInGrid'}, 'host': {'platform': 'Darwin-15.2.0-x86_64-i386-64bit', 'python_version': '2.7.10', 'is_vm': False}, 'version': u'3.8.2', 'tool_version': '4.0.1'}}
DEBUG:requests.packages.urllib3.connectionpool:"HEAD / HTTP/1.1" 301 0
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): td.getpebble.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /td.pebble.sdk_events HTTP/1.1" 200 0
Waiting for phone to connect...
Connected.
DEBUG:libpebble2.communication:-> WatchVersion(command=None, data=WatchVersionRequest())
DEBUG:libpebble2.communication:-> 0001001000
DEBUG:libpebble2.communication:<- 00960010015509b4fb76322e392e31000000000000000000000000000000000000000000000000000035343636346264000005015222545f76312e352e350000000000000000000000000000000000000000000000000000316331363237350001050152e2f83256335233000000000051313536303535453030513604750648b4b026658a035509b4fb656e5f55530000015858585858585800
DEBUG:libpebble2.communication:<- WatchVersion(command=1, data=WatchVersionResponse(running=WatchFirmwareVersion(timestamp=1426699515, version_tag=v2.9.1, git_hash=54664bd, is_recovery=False, hardware_platform=5, metadata_version=1), recovery=WatchFirmwareVersion(timestamp=1377981535, version_tag=v1.5.5, git_hash=1c16275, is_recovery=True, hardware_platform=5, metadata_version=1), bootloader_timestamp=1390606386, board=V3R3, serial=Q156055E00Q6, bt_address=04750648b4b0, resource_crc=644188675, resource_timestamp=1426699515, language=en_US, language_version=1, capabilities=24866934413088856, is_unfaithful=None))
Installing app...
App install failed.
INFO:root:Spent 0.001597 seconds waiting for analytics.
I've tried several things to resolve this issue:
creating new project from provided template;
disconnecting the watch;
watch factory reset;
iOS pebble app reinstallation;
creating and linking to a new cloudpebble account,
but still no luck installing any new apps or reinstalling old ones...
Any help would be greatly appreciated (or more tips on what else to try...).
PS: Apps load just fine in an emulator.
PS2: I can download and install apps from the store just fine [I found PixelMiner that way : )].
PS3: I do have a developer connection on and there is a valid IP shown on iOS app.
I got an answer from Morris on pebble forums. I was developing for SDK3, but still running older version of firmware on a pebble watch. After an update, deployment works again!
Original response:
You are building with the latest SDK but your watch has not the latest firmware.
You either have to upgrade your Pebble Classic to firmware V3.8.2 (see Upgrade to SDK3) or if you want to build for the old firmware you have to use SDK2 instead (see SDK2)

cordova windows error: "cordova/windows8/commandProxy" not found

I have built a Cordova-based Windows application. As soon as I add any plugin, the app starts crashing with the exception cordova/windows8/commandProxy not found.
Cordova version: 4.3.0
It seems that cordova/windows8/commandProxy is deprecated in Cordova 4.3.0.
I have replaced this statement in plugin file
require("cordova/windows8/commandProxy")
to
require("cordova/exec/proxy")
and it seems to work.
For example I changed line number 18 in PushPluginProxy.js from
require("cordova/windows8/commandProxy").add("PushPlugin", module.exports);
to
require("cordova/exec/proxy").add("PushPlugin", module.exports);
The name in the string varies depending on the plugin.
Alternatively, you can patch the plugin like in this pull request from the AppVersion plugin i.e.:
Change
require("cordova/windows8/commandProxy").add("AppVersion", AppVersionProxy);
to
cordova.commandProxy.add("AppVersion", AppVersionProxy);

Deployment failed because of an internal error: An item with the same key has already been added

I'm using VS2013, Xamarin.Android 4.12.4.20.
Build is successful.
I'm getting error from title whenever I try to deploy in debug mode or package.
It started to happened today it work fine before.
I've restarted VS, device, PC - none helped.
Stack trace:
Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Mono.AndroidTools.Adb.AdbSyncDirectory.Add(AdbSyncItem entry)
at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String destinationPath, CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.FastDev()
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)
Build output:
3>Build succeeded.
3>Waiting for device..
3>Detecting installed packages
3>Detecting installed packages...
3>
3>Removing previous version of application
3>Removing previous version of application...
3>
3>Installing application on device
3>Copying application to device...
3>
3>Getting installation path...
I've figured it out. Make sure that you don't have different versions of the same dll referenced!!
Let me describe my set up a bit more that will help with explaining why exception happened.
I've got two projects
Domain - library with code shared between all platforms
Android - android specific code
Both have nuget references to the same library. At some point android (only in this project) nuget references have been updated which resulted in two versions of the same library required by the application (Domain project still referenced old nuget).
When I tried to package solution I would get warning like :
Consider app.config remapping of assembly "{Library}" from Version "5.6.0.0" [] to Version "5.6.1.0" [{Path}] to solve conflict and get rid of warning.
Once I've update Domain's nuget everything worked.

flex 4.6 mobile project debug error using air 3.4

i've followed this in order to flashbuilder 4.6 to use air sdk 3.4. no problems, or hiccups with the update.
the only problem is when i try to debug a mobile project using this sdk, either for android or ios i get the following error:
Process terminated without establishing connection to debugger.
invalid application descriptor: Unknown namespace:
http://ns.adobe.com/air/application/3.4
Launch command details: "C:\Program Files (x86)\Adobe\Adobe Flash
Builder 4.6\sdks\4.6.1\bin\adl.exe" -runtime "C:\Program Files
(x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.1\runtimes\air\win"
-profile mobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -XversionPlatform IOS "C:\Users\joao\Adobe Flash Builder 4.6\teste34\bin-debug\teste34-app.xml" "C:\Users\joao\Adobe Flash Builder 4.6\teste34\bin-debug"
i've also got this problem.
following is what i've done:
1:create a new empty mobile application and debug it runs
2:open the new app's '{appname}-app.xml' file , find the 'xmlns' property in application root node for example
<application xmlns="http://ns.adobe.com/air/application/3.1">
3:replace the row of your old application
So i think the problem is your air sdk can not support the 3.4 version

Resources