Cannot add models to scene in Alice 2.4.1: CapabilityNotSetException - alice

When trying to add a new model (add objects -> click model -> add instance to world), I get a message box telling me that An unknown error has occured. The entity gets added to the object tree (see screenshot), but does not appear in the render window.
I'm using Alice for the first time on this computer. It worked fine on other computers in earlier versions on different PCs. I have searched the Alice forums for this particular issue, but no avail. The problem does not occur in Alice 2.3.3.
Alice version: 2.4.1
os.name: Windows XP
os.version: 5.1
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 20.0-b11
user.dir: C:\Programme\Alice 2.4\Required
Error during simulation.
javax.media.j3d.CapabilityNotSetException: Appearance: no capability to set transparencyAttributes
at javax.media.j3d.Appearance.setTransparencyAttributes(Appearance.java:374)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.java3drenderer.AppearanceProxy.changed(AppearanceProxy.java:122)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.AbstractProxyRenderer.dispatchPropertyChange(AbstractProxyRenderer.java:38)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.AbstractRenderer.changed(AbstractRenderer.java:220)
at edu.cmu.cs.stage3.alice.scenegraph.Element.onPropertyChange(Element.java:155)
at edu.cmu.cs.stage3.alice.scenegraph.Element.onPropertyChange(Element.java:162)
at edu.cmu.cs.stage3.alice.scenegraph.Appearance.setOpacity(Appearance.java:115)
at edu.cmu.cs.stage3.alice.core.Model.propertyChanged(Model.java:201)
at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:269)
at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:427)
at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:453)
at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:470)
at edu.cmu.cs.stage3.alice.core.Property.setHowMuch(Property.java:476)
at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:492)
at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation$RuntimePropertyAnimation.set(PropertyAnimation.java:90)
at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation$RuntimePropertyAnimation.update(PropertyAnimation.java:135)
at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.update(DoTogether.java:71)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.update(DoTogether.java:71)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
at edu.cmu.cs.stage3.alice.core.util.OneShot.scheduled(OneShot.java:56)
at edu.cmu.cs.stage3.alice.core.Scheduler.schedule(Scheduler.java:72)
at edu.cmu.cs.stage3.alice.core.Scheduler.run(Scheduler.java:98)
at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:117)
at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:78)
at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Related

Failed to navigate to http://10.22.32.185 This usually means that a call to the COM method IWebBrowser2::Navigate2() using IE 11 on Win10 and Selenium

I have problem with start webdriver IE 11 in Selenium , Windows 10 version 20H2.
[ERROR] Tests run: 23, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 820.596 s <<< FAILURE! - in TestSuite
[ERROR] test.TestTrunkIE.firstTestIE Time elapsed: 0.07 s <<< FAILURE!
org.openqa.selenium.WebDriverException:
Failed to navigate to http://10.22.32.185:8090/login. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed. The error returned is: Received error: 0x800700aa ['Żądane zasoby są w użyciu.']
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'APS00080705-MB', ip: '10.58.97.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_251'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: false, ie.browserCommandLineSwitches: , ie.edgechromium: false, ie.edgepath: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: true, initialBrowserUrl: http://localhost:48363/, nativeEvents: false, requireWindowFocus: false}, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept}
Session ID: 02ba92b2-7827-413c-9b02-16d3156abd23
at test.TestTrunkIE.firstTestIE(TestTrunkIE.java:51)
'The requested resource is in use.'
It's my code:
#BeforeTest
public void setUp() throws Exception {
System.setProperty("webdriver.ie.driver", "lib\\IE\\IEDriverServer.exe");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("nativeEvents", false);
caps.setCapability("unexpectedAlertBehaviour", "accept");
caps.setCapability("ignoreProtectedModeSettings", true);
caps.setCapability("disable-popup-blocking", true);
caps.setCapability("enablePersistentHover", true);
caps.setCapability("ignoreZoomSetting", true);
caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
caps.setCapability("os", "Windows");
caps.setCapability("os_version", "10");
caps.setCapability("browser", "IE");
caps.setCapability("browser_version", "11.0");
caps.setCapability("resolution", "1920x1080");
caps.setCapability("browserstack.local", true);
caps.setCapability("browserstack.debug", true);
caps.setCapability("browserstack.networkLogs", true);
caps.setCapability("browserstack.selenium_version", "3.141.59");
caps.setCapability("INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", true);
caps.setCapability("setJavascriptEnabled", true);
steps = new WebDriverSteps(new InternetExplorerDriver(caps));
}
'''
In Internet Exprorer I disable checkbox Enable Protected Mode ....
'''
[ERROR] Failures:
[ERROR] TestTrunkIE.firstTestIE:51 » WebDriver Failed to navigate to http://10.22.32.1...
[ERROR] TestTrunkIE.firstTestIE46:62 » WebDriver Failed to navigate to http://10.22.32...
[ERROR] TestTrunkIE.firstTestIE46Krus:74 » WebDriver Failed to navigate to http://10.2...
[INFO]
This error message...
org.openqa.selenium.WebDriverException: Failed to navigate to http://10.22.32.185:8090/login. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.
...implies that the IEDriverServer was unable to initiate/spawn a new Browsing Context i.e. Internet Explorer Browser session as a COM object.
Protected Mode settings for Internet Explorer
JimEvans in his article mentioned, while automating internet-explorer through iedriverserver:
A browser session was represented by a single instance of the iexplore.exe executable. A framework for driving IE could instantiate the browser as a COM object using CoCreateInstance(), or could easily get the COM interfaces to a running instance by using the presence of ActiveAccessibility and sending a WM_HTML_GETOBJECT message to the appropriate IE window handle. Once the framework had a pointer to the COM interfaces, you could be sure that they'd be valid for the lifetime of the browser. It also meant you could easily attach to the events fired by the browser through the DWebBrowserEvents2 COM interface.Then along came the combination of IE 7 and Windows Vista. In and effort to reduce the attack surface presented by malicious web sites, IE 7 introduced something called Protected Mode, which leveraged Mandatory Integrity Control in Windows Vista to prevent actions initiated IE, usually initiated by JavaScript, from being able to access the operating system the way it could in prior releases. While this was generally a welcome development for most users of IE, it created all manner of problems for automating IE. When you cross into or out of Protected Mode by, say, navigating from an internal intranet website to one on the internet, IE has to create a new process, because it can't change the Mandatory Integrity Control level of the existing process. Moreover, in IE versions after 7, it's not always obvious that a Protected Mode boundary has been crossed, since IE tries to present a better user experience by seamlessly merging the browser window of the new process with the already opened browser window. This under-the-covers process switching also means that any references pointing to IE's COM objects before the Protected Mode boundary crossing are left pointing to objects that are no longer used by IE after the boundary crossing.
Further, the Required Configuration of Internet Explorer Driver clearly mentions:
The IEDriverServer exectuable must be downloaded and placed in your PATH.
On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
Additionally, Enhanced Protected Mode must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
For Windows 10, you also need to set Change the size of text, apps, and other items to 100% in display settings.
For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates.
For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
Note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Inside this key, create a DWORD value named iexplore.exe with the value of 0`.
Solution
First, you need to ensure that the Protected Mode settings for each zone to be the same value. Additionally you also need to ensure the Required Configuration for Internet Explorer Driver.
References
You can find a couple of relevant discussions in:
Internet Explorer Protective mode setting and Zoom levels
How does the registry entry HKEY_LOCAL_MACHINE\…\FEATURE_BFCACHE for InternetExplorerDriver solves the Internet Explorer 11 issue?
How to ignore protected Mode Settings for Internet Explorer using setCapability() through Selenium and Java?

Stripe fails on macbook localhost but works on iMac localhost

I have integrated Stripe into my Ruby Application. When testing on LocalHost on my iMac everything works fine.
The deployment in production works fine
When testing on my MacBook Pro it errors out on submission. The MacBook and iMac are using the same operating systems. iMac late 2014, MacBook late 2016.
This is my first stripe integration and I am stumped.
There are no differences in code, and so I am considering that the environment is not initialising, but I don't know what the issue is.
The error is as follows:
"No API key provided. Set your API key using "Stripe.api_key = "
Showing the following code as the culprit - But remember this works well on two other installations and so I can't see it being the code at fault (But I am happy to be wrong if you all have other ideas!)
Stripe::Customer.retrieve(stripe_id)
else
stripe_customer = Stripe::Customer.create({
email: email,
})
This is the config file
stripe.rb
Rails.configuration.stripe = {
:publishable_key => ENV["STRIPE_TEST_PUBLISHABLE_KEY"],
:secret_key => ENV["STRIPE_TEST_SECRET_KEY"]
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
StripeEvent.configure do |events|
events.subscribe "charge.succeeded", Webhooks::ChargeSucceeded.new
events.subscribe "customer.subscription.deleted",
Webhooks::CustomerSubscriptionDeleted.new
end

Wifi WPS client start in Windows 10 in script or code

I can not find how to start WPS client in Windows 10 from command prompt or powershell. When I used Linux, everything was really ease with wla_supplicant (wpa_cli wps_pbc). Is there something similar in Windows?
Does anyone know how to set up Wi-Fi network (over WPS) key without human input in Windows?
I also tried WCN (Windows Connect Now) from Microsoft as it implements WPS features. I got also samples from Windows SDK on WCN, but they could not get key by WPS (it faild). But if I use Windows user interface to connect wiothout PIN, everyting seems to be pretty fine.
I am sure that there is possibility to do that, it is very important to perform Wifi Protected Setup by button start from the command prompt or app (C++/C#) without human intrusion or input (once WPS is on air, Windows should automatically get the network key and connect then).
I don't know if it's too late to answer, just put what I know in here and hope it can help.
First, if your system has updated to 16299(Fall Creator Update), you can just simply use new wifi api from UWP.
Install newest Windows SDK, create a C# console project, target C# version to at least 7.1, then add two reference to the project.
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll
C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd
After all of that , code in below should work.
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.WiFi;
class Program
{
static async Task Main(string[] args)
{
var dic = await DeviceInformation.FindAllAsync(WiFiAdapter.GetDeviceSelector());
if (dic.Count > 0)
{
var adapter = await WiFiAdapter.FromIdAsync(dic[0].Id);
foreach (var an in adapter.NetworkReport.AvailableNetworks)
{
if (an.Ssid == "Ssid which you want to connect to.")
{
// Fouth parameter which is ssid can not be set to null even if we provided
// first one, or an exception will be thrown.
await adapter.ConnectAsync(an, WiFiReconnectionKind.Manual, null, "",
WiFiConnectionMethod.WpsPushButton);
}
}
}
}
}
Build and run the exe, then push your router's button, your pc will be connect to the router.
But if you can not update to 16299, WCN will be your only choice. You may already notice that if call IWCNDevic::Connect frist with push-button method, the WSC(Wifi Simple Configuration) session will fail. That's because WNC would not start a push-button session as a enrollee, but only as a registrar. That means you have to ensure that router's button has been pushed before you call IWCNDevic::Connect. The way to do that is using Native Wifi api to scan your router repeatedly, analyse the newest WSC information element from the scan result, confirm that Selected Registrar attribute has been set to true and Device Password Id attribute has been set to 4. After that, query the IWCNDevice and call Connect function will succeed. Then you can call IWCNDevice::GetNetworkProfile to get a profile that can use to connect to the router. Because it's too much of code, I will only list the main wifi api that will be used.
WlanEnuminterfaces: Use to get a available wifi interface.
WlanRegisterNotification: Use to register a callback to handle scan an connect results.
WlanScan: Use to scan a specified wifi BSS.
WlanGetNetworkBsslist: Use to get newest BSS information after scan.
WlanSetProfile: Use to save profile for a BSS.
WlanConnect: Use to connect to a BSS.
And about the WSC information element and it's attributes, you can find all the information from Wi-Fi Simple Configuration Technical Specification v2.0.5.
For Krisz. About timeout.
You can't cast IAsyncOperation to Task directly. The right way to do that is using AsTask method. And also, you should cancel ConnectAsync after timeout.
Sample code:
var t = adapter.ConnectAsync(an, WiFiReconnectionKind.Manual, null, "",
WiFiConnectionMethod.WpsPushButton).AsTask();
if (!t.Wait(10000))
t.AsAsyncOperation().Cancel();

How can I reconnect Selenium to IE11 after navigating with the prerender resource hint?

I'm working on a Selenium (Ruby API) test that navigates from one page to another. It started failing on IE11/Win10 (via SauceLabs) recently when I added a link rel="prerender" resource hint on the first page pointing to the second page, to speed up navigation. The failure is this (see full backtrace) and consistently occurs on the first Selenium command after navigation occurs.
Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.114.237', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=false, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=false, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=about:blank, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX79d496ee
*** Element info: {Using=class name, value=dialog-title} (org.openqa.selenium.NoSuchWindowException) (Selenium::WebDriver::Error::NoSuchWindowError)
For what it's worth, the prerendering works fine when testing IE11 manually, and Selenium+Chrome (which also respects the prerender directive) has no problem with this.
My suspicion is that IE implements the prerender by loading the page in a hidden window/context, then destroying the current window and swapping in the new one upon navigation - causing Selenium's handle on the window to become invalid. I've already attempted to work around this by trying to force Selenium to reconnect to the window:
# Wait a few seconds, then
#driver.switch_to.window(#driver.window_handles.last)
But I've discovered that #driver.window_handles is empty after navigation, even though the SauceLabs screencast shows the navigation working properly.
Is there any way to reconnect Selenium to IE11 after navigating with the prerender resource hint?

Ejabberd can't register new user

I am on mac using latest version of mac OS (Mavericks.) I downloaded ejabberd 13.12 for mac, installed it, and started it through terminal. Now i can open it in browser (i am using mozilla firefox 26 and latest safari). and went to admin console.
Everything seems fine, i can log in with my user name and password (which i provided during jabber installation). Now i went to access control lists, and try to add additonal users. Problem is i can't.
In mozilla i get error message, that connection with server was reset, and on safari i get blank page. After I refresh new users are not there. Here is the screen i am talking about:
What am I missing here?
EDIT:
This is the error message i get:
2014-02-05 16:29:39.204 [error] <0.428.0> CRASH REPORT Process <0.428.0> with 0 neighbours crashed with reason: no case clause matching
{error,{aborted,{{case_clause,{user,<<"brad">>,<<"donjohnson">>}},
[{acl,normalize_spec,1,[{file,"src/acl.erl"},{line,222}]},{acl,'-add_list_local/3-fun- 1-',2,[{file,"src/acl.erl"},{line,157}]},{lists,foreach,2,[{file,"lists.erl"},{line,1323}]},
{mnesia_tm,apply_fun,3,[{file,"mnesia_tm.erl"},{line,832}]},
{mnesia_tm,execute_transaction,5,[{file,"mnesia_tm.erl"},{line,812}]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,205}]}]}}} in ejabberd_web_admin:process_admin/2 line 700
For more information see github.
Also I may be going out on a limb here, but are you trying to add users to the server or users to the ACLs?
If you are just trying to add users, do this from your Virtual Hosts -> (Host) -> Users area.
If you are in fact trying to add ACLs you could try adding them in the ejabberd.cfg file.
As jokker mentioned, you are in ACL menu, not in register menu.
To fix error you posted in ACL menu, source code should be patched.
--- a/src/ejabberd_web_admin.erl
+++ b/src/ejabberd_web_admin.erl
## -1138,7 +1138,7 ## string_to_spec2(ACLName, Val) ->
jlib:string_to_jid(Val),
case U of
<<"">> -> {ACLName, S};
- _ -> {ACLName, U, S}
+ _ -> {ACLName, {U, S}}
end.
It seems that other string_to_spec function should be fixed.

Resources