Can't find variable: captureLocalizedScreenshot - ios

I got this error when I run Fastlane's Snapshot tool:
UIAutomation Error: Script threw an uncaught JavaScript error: Can't find variable: captureLocalizedScreenshot on line 8 of snapshot.js
This is my snapshot.js file:
#import 'SnapshotHelper.js'
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
target.delay(3);
captureLocalizedScreenshot('0-LandingScreen');

The problem was the single quote on the import statement.
For anyone like me, addicted to code stylers, make sure it doesn't change this first line.
It should be:
#import "SnapshotHelper"

Related

When I try to install and create a new project with rapidAPI extension this error occured

Extension 'RapidAPI.vscode-rapidapi-client' CANNOT use API proposal: quickPickSeparators.
Its package.json#enabledApiProposals-property declares: [] but NOT quickPickSeparators.
The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api RapidAPI.vscode-rapidapi-client
anyone knows how to fix it?
Thank you so much

Define const level class in Flutter

I want define a class Const to reuse and easier to handle edit, manternance. Example:
My issue screenshot
But Dart Analysis has 2 warnings such as:
error: The const variable 'String' must be initialized.
error: Expected to find ';'.
There's isn't any line #5 in your class, neither any String variable. Try refreshing your IDE
Perhaps the log you are getting is from some previous build!

What is the purpose of foundation.dart in Writing and Reading Files using path_provider plugin?

I am trying to understand how to read and write data on text files using path_provider plugin.
I've read an example on how to use it on Flutter from here. Then I saw this line of code which I don't understand:
import "package:flutter/foundation.dart";
I tried to comment it out from the code and ran "flutter run":
//import "package:flutter/foundation.dart";
And to my surprise, it ran perfectly. Although it raised some errors like:
E/DartVM (23127): 'dart:core/runtime/libintegers.dart': error: Unexpected tag 0 (Nothing) in ?, expected expression
E/DartVM (23127): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method ~ in class _Smi
and
E/DartVM (23237): 'dart:typed_data': error: Unexpected tag 15 (DirectPropertyGet) in ?, expected type
E/DartVM (23237): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method get:x in class _Float32x4
But it ran well. I don't know why. When should I use it? What method from the code did the foundation.dart was used?
I would appreciate any kind of enlightment. Thanks in advance.
[UPDATE]
I think I understand why foundation library was used in the example code. Maybe because the example code used the "required" constant from the foundation library.

invalid method (createTableViewRow) passed to UIModule

i am having this error when i run my app on the device ( iPhone 7 ), but when i run it in the emulator works fine.
Its really strange.
The code is:
Ti.API.info( json );
var renglon = Ti.UI.createTableViewRow({
id: id,
width: Ti.UI.FILL,
height: '80dp',
});
In the emulator works OK, but in the device i got an error, the error appears just after the json is printed in the log.
[WARN] : Attempted to load TiUITableViewRowProxy: Could not find class definition.
[ERROR] : Script Error {
[ERROR] : column = 2875;
[ERROR] : line = 1;
[ERROR] : message = "invalid method (createTableViewRow) passed to UIModule";
[ERROR] : sourceURL = "file:///var/containers/Bundle/Application/B99CA23F-183D-4C5F-A5DC-FA9CFC614186/CarWash.app/src/vistas/personal.js";
[ERROR] : stack = "[native code]\nagregarRenglonPersonal#file:///var/containers/Bundle/Application/B99CA23F-183D-4C5F-A5DC- FA9CFC614186/CarWash.app/src/vistas/personal.js:1:2875\nonload#file:///var/contain ers/Bundle/Application/B99CA23F-183D-4C5F-A5DC- FA9CFC614186/CarWash.app/src/vistas/personal.js:1:3651";
[ERROR] : }
-- End application log -------------------------------------------------------
i'm using:
Titanium appcelerator studio build: 4.9.0.201705302345
SDK: 6.1.0GA
Thanks in advance.
We are run into the same error today!
Wrong source code in respect of the table view was the reason, a stupid C&P error:
var tableView = Ti.UI.createLabel({...});
instead of
var tableView = Ti.UI.createTableView({...});
First of all: i do not really like Appcelerator Studio, did you try compiling with the cli? appc run -p ios
If that does not work it would be intresting to see more code than the snippet you posted
Did you try with older sdks? If not then try this code with older sdk and still you get same error then i would like to see more code.

Thunderbird extension console logging

I have the following code in my bootstrapped Thunderbird add-on main.js file:
exports.main = function() {
console.log("abc");
};
When I run this code in FireFox in Add-on Builder, I get this message displayed in FireFox Error Console:
info: vladp: abc
However, when I run my extension in Thunderbird nothing is displayed. I have set up the development enviroment as described here: https://developer.mozilla.org/en-US/docs/Setting_up_extension_development_environment
How do I make it work in Thunderbird Error Console? Or is there any other way to log some debug information, apart from "dump()"?
UPDATE 1
As suggested by speedball2001, I've changed my code to:
exports.main = function() {
var Application = Components.classes["#mozilla.org/steel/application;1"].getService(Components.interfaces.steelIApplication);
Application.console.log('Bam!');
};
However, when I run Thunderbird, I get the following error in error console:
Timestamp: 2013.05.22. 16:39:07
Error: myfirstext: An exception occurred.
ReferenceError: Components is not defined
resource://jid0-7yp22cmsooypei7nicamg3n0ha0-at-jetpack/myfirstext/lib/main.js 57
How do I fix it?
Thunderbird provides an Application interface that, among other things, helps with logging:
var {Cc, Ci} = require("chrome");
var Application = Cc["#mozilla.org/steel/application;1"]
.getService(Ci.steelIApplication);
Application.console.log('Bam!');

Resources