Yesterday (10/19/2015 06:00 PM), the ARC Welder app begin to not start apps.
For some reason, now, when I click "TEST", nothing happens on Windows 10, I tested on MAC/Windows 7 also, and works fine.
Chrome
Versão 46.0.2490.71 (64-bit)
ARC Welder
46.5021.478.14
Update
This is the error shown on console.
Uncaught (in promise) TypeError: Cannot read property 'angle' of
undefined
at $jscomp.scope.Plugin.computeLayout_ (chrome-extension://joabdphlghkbahegchlcmhbaaijcgghj/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:125:302)
at $jscomp.scope.Plugin.doLayout_ (chrome-extension://joabdphlghkbahegchlcmhbaaijcgghj/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:122:383)
at $jscomp.scope.Plugin.initializeWindow_ (chrome-extension://joabdphlghkbahegchlcmhbaaijcgghj/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:98:175)
at null. (chrome-extension://joabdphlghkbahegchlcmhbaaijcgghj/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:95:238)
Workaround SOLUTION at bottom.
Ok so what I have so far is not a solution just information
The problem seems to be coming from the runtime part of the Arc Extension:
SEE-> https://chrome.google.com/webstore/detail/app-runtime-for-chrome-be/mfaihdlpglflfgpfjcifdjdjcckigekc
The problem is in the file plugin.js
// Let the CameraManager in Android know what the current orientation is
var message = {
namespace: 'pluginCameraManager',
command: 'screenRotation',
data: {
'angle': screen.orientation.angle
}
};
this.postMessage(message);
Cannot read property 'angle' of undefined at...
'angle': screen.orientation.angle
//for context
var a=Promise.all([this.createAppPlugin_(),window.arcparams.systemDirectoriesReady]);
//problem is initializeWindow_() fails
a.then(function(){this.initializeWindow_();
** WORK AROUND SOLUTION**
This may cause more bugs, I don't know, do it at own risk.
Open the file:
%LOCALAPPDATA%\Google\Chrome\User Data\Default\Extensions\mfaihdlpglflfgpfjcifdjdjcckigekc\46.5021.478.18_0\gen_index.min.js
ie
extension://joabdphlghkbahegchlcmhbaaijcgghj/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:125:302)
So on line 125 at character 302 you should find the word 'angle' as in:
data:{angle:screen.orientation.angle}
change that to:
data:{angle:0}
0 is used,you can read about why -> Find screen angle when orientation is fixed in android
Related
Downloaded Xamarin Camera2Basic project
Initially all works correctly as it's begin tested in Visual Studio 2017 emulator.
Commented out code inside "CameraCaptureStillPictureSessionCallback.cs" as shown below to allow the still image captured to be displayed on the emulator screen after clicking the "Take Picture" button:
public override void OnCaptureCompleted(CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result)
{
//Owner.ShowToast("Saved: " + Owner.mFile);
//Log.Debug(TAG, Owner.mFile.ToString());
//Owner.UnlockFocus();
}
Clicking the "Take Picture" button hides itself, and shows another button labeled "Retake Picture" on the screen (which I added after the fact and the code is located in the Camera2BasicFragment.cs file, but the code is inconsequential to the issue).
Clicking the now visible "Retake Picture" button does the following:
Hides itself
Shows the "Take Picture" button
Calls UnlockFocus()
UnlockFocus() allows the camera's stream to display continuously on the screen instead of the still image captured previously.
Now, when I click the "Take Picture" button again (to attempt to capture a new still image), the app crashes.
Visual studio does not provide any meaningful error messages. The closest useful bit of information are the error messages displayed int the Device Log:
07-26 23:29:03.201 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 BufferQueueProducer [ImageReader-640x480f100m2-6987-0] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
07-26 23:29:07.174 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 RequestThread-0 Hit timeout for jpeg callback!
07-26 23:29:03.201 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 Legacy-CameraDevice-JNI LegacyCameraDevice_nativeProduceFrame: Error while producing frame Function not implemented (-38).
I'm not sure what to make of these errors, or which settings/code to change to allow the "Retake Picture" functionality to work without crashing the app.
Any suggestions?
EDIT 1:
Per request, where is a link to the project as I currently have it.
https://drive.google.com/file/d/0B7OSuA_ybXcFb081T210UlQzZkE/view?usp=sharing
Here is some other seemingly pertinent information:
This code was run using:
a. Windows 10 Pro, Visual Studio 2017 Community, Android Emulator
For Visual Studio, Hyper-v Virtual Manager, Android 6.0
(Marshamallow SDK 23), Tablet sized template
b. 2013 Macbook Pro, Visual Studio For Mac (latest version), default
emaulator, Android 6.0 (Marshmallow SDK 23), Tablet sized template.
The failure to take snapshot after second "LockFocus" call is observed in both environments.
The Mac made it easier to find some more meaninful errors:
a. The error I saw happened on method "produceFrame" inside
LegacyCameraDevice.java
I've the problem with this demo also, The real problem behind this is about the IOnImageAvailableListener, it will not trigger the OnImageAvailable method to save the picture...
After read the code, i found out that the demo is broken, it missing some piece.
In the Camera2BasicFragment.cs, in the OnCreateMethod, you will need to add this line
mCaptureCallback = new CameraCaptureListener() { Owner = this};
The entire method should look like this:
public override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
mStateCallback = new CameraStateListener() { owner = this };
mSurfaceTextureListener = new Camera2BasicSurfaceTextureListener(this);
// fill ORIENTATIONS list
ORIENTATIONS.Append((int)SurfaceOrientation.Rotation0, 90);
ORIENTATIONS.Append((int)SurfaceOrientation.Rotation90, 0);
ORIENTATIONS.Append((int)SurfaceOrientation.Rotation180, 270);
ORIENTATIONS.Append((int)SurfaceOrientation.Rotation270, 180);
}
The interesting thing is, if you run this on emulator, nothing will happened, because in the CameraCaptureListener.cs file, this will always return 0, not ControlAFState.FocusedLocked or ControlAFState.InActivate
Integer afState = (Integer)result.Get(CaptureResult.ControlAfState);
Event if i hack the If method to be able to run jump into next step, the method OnImageAvaiable of ImageAvailableListener.cs will never be triggered by emulator. But if i run on the real device, it ran fine ?!
So the fix is:
1. Add the code above like i explained on the onCreate function.
2. Don't use emulator to run Camera2, it's buggy.
Hope it help :)
If you are still interested; IOnImageAvailableListener not trigger OnImageAvailable method in Visual Studio Emulator For Android.
Code is correct but Visual Studio Emulator For Android have a bug. I hope they fix it as soon as possible. On the other hand you can try your code in Xamarin by using Android Studio Emulator without any bug. It is easy and you dont need to know anything about Java or Android Studio Just follow the below steps
Install Android Studio with virtual device
Close Hper-v on your pc (windows -> control panel -> programs -> programs and features -> Turn windows features on or off)
Open android studio -> Tools -> Avd Manager -> Create Virtual Device
Visual studio detect the virtual device just use it on Visual Studio Xamarin
hope it help
I'm trying (for too long...) to get appium working with react native, but can't seem to find any element.
I'm using an emulator, Nexus 6, android 6.0, ubuntu, appium 1.6.0, RN 0.39.2.
I'm trying to get the most basic example to work:
// foo.js
render () {
return (
<Text>foo</Text>
)
}
// spec.js
// ... some setup ...
driver
.elementByAccessibilityId('foo')
.click()
and I'm getting...
1) should be able to find 'Buttons' and click it
0 passing (13s)
1 failing
1) Android find and click should be able to find 'Buttons' and click it:
Error: [elementByAccessibilityId("foo")] Error response status: 7, , NoSuchElement - An element could not be located on the page using the given search parameters. Selenium error: An element could not be located on the page using the given search parameters.
I also tried setting:
<Text accessible accessibilityLabel={ 'foo' }>foo</Text>
same response ...
any ideas?
I ended up using this solution:
<Text accessibilityLabel={ 'FOO' } testID={ 'FOO' }>some stuff here</Text>
and then in the test:
driver
.elementByAccessibilityId('FOO')
Credit goes to #jonesdar for pointing that out here
I am using the Ionic Framework to build a mobile app for Android/iOS. I was able
to build the project for android (ionic build android). When I run the app, it will be only a white screen, that's because there is an error (when you use GapDebug, you can run apps on your phone and you will be able to debug, and see errors). Now if I run it on the desktop browser there really is NO error and everything is working. Below is the error that is shown in GapDebug:
Now when you check the code in service.js line 394:
There's nothing wrong with the code right? If I try to change line 394 to something like key : self.currentUser, there will be NO error and the app will work. What seems to be the problem here?
Not sure why you are making an object's attribute a list? If you want the key to be childQuestionSnapshot.key then remove the square brackets.
If you are trying to update a list of objects, you can do something similar to the below:
var test = [{key: 'thisguy'},{key: 'thatguy'},{key: 'myguy'}]
test.forEach(function(item){
item['key']='newguy'
})
console.log(test)
Do this instead
var updateObj = {};
updateObj[childQuestionSnapshot.key] = self.currentUser;
applicantRef.update(updateObj, function() {
console.log("applicant answers updated");
});
I developed a simple javafx application to be ported in Android Environment, however I cant type any characters in the TextField. I guess its a bug, how to fix this one?
Th problem on galaxy S5 android 5.0.1 is not present but on galaxy tab 4 android 5.0.2 it doesn't work i type but none is displyed.
Tried with normal textfield. And the problem persist also I have added the properties .
Another strange rhig is that the space where recognizer. And the del button . The text not
THe code by example is very easy
Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
double width = visualBounds.getWidth();
double height = visualBounds.getHeight();
TextField tt= new TextField();
tt.setTranslateY(-150);
StackPane stackPane = new StackPane();
stackPane.getChildren().addAll(tt);
borderpane.setCenter(stackPane);
Scene scene = new Scene(borderpane, width, height);
stage.setScene(scene);
Assuming that CustomTextField is just a custom TextField, this is a known issue, not related to the CustomTextField itself, given that it works in other device.
If you debug it:
./adb logcat -v threadtime
you surely find an exception that explains the issue: a StackOverFlow exception.
On older devices it can be solved adding this: create a java.custom.properties file, and include in it this property:
monocle.stackSize=128000
You may also include this one:
monocle.platform=Android
(it will be soon included by default in the next version)
Put the file at the root of your classpath, e.g. in the folder src/android/resources of your project.
Build and deploy the project on your mobile and check again.
I already tried to find some answer for this but unfortunately I couldn't. I am trying to teach myself Android. Apparently, for no reason, Eclipse stops recognizing a variable between one line and the next one.
I have a class that extends a View (a custom View). I am getting this error on the onDraw (sorry, can't post image)
public void onDraw(Canvas c) {
c.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher), 0, 0, null);
c.Rotate(-10);
}
The drawBitmap line is not recognized as error. If I go after the . in the drawBitmap line and press Ctrl+Space, I get just the Java.Object functions (Equals, hashCode, etc) and not the Canvas'. The c.Rotate line is marked as error - if I open c. the autocomplete does not recognize anything but the basic object functions (no draw, rotate, get/set, etc);
If I try to use the variable before the DrawBitmap, it also won't recognize.
The weird thing is: if I keep just the drawBitmap line, it compiles and runs fine.
What could it be?
EDIT:
Eclipse
Version: 3.7.2
Build id: M20120208-0800
Android Development Toolkit
Version: 16.0.1.v201112150204-238534
Build Target: Android 2.2 (Rev 8)
SOLUTION:
I just had to go into the workspace folder and delete the .Metadata, and re-add the project. I don't know what caused this error, but it got fixed. For more information, please check the first answer. If someone knows what happened, I would find it very interesting to understand what happened.
should be lowercase rotate
c.rotate(-10);
the rest is very mysterious