Upgrade to Karate 1.0 issues with "karate.callSingle" [duplicate] - upgrade

This question already has answers here:
karate.callSingle not found .feature file in karate-config.js
(2 answers)
Closed 1 year ago.
I am trying to upgrade Karate from version 0.9.6 to 1.0.0 and started to have some issues with the new JS engine.
01: karate.callSingle('classpath:commons/product/CreateProductTestDataForCurrentTenant.feature')
<<<<
org.graalvm.polyglot.PolyglotException: Multi threaded access requested by thread Thread[pool-1-thread-4,5,main] but is not allowed for language(s) js.
- com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:132)
- com.oracle.truffle.polyglot.PolyglotContextImpl.throwDeniedThreadAccess(PolyglotContextImpl.java:727)
- com.oracle.truffle.polyglot.PolyglotContextImpl.checkAllThreadAccesses(PolyglotContextImpl.java:627)
- com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:526)
- com.oracle.truffle.polyglot.PolyglotEngineImpl.enter(PolyglotEngineImpl.java:1857)
- com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:104)
- org.graalvm.polyglot.Value.canExecute(Value.java:434)
This works with version 0.9.6
Is some additional config missing to making it work? I could not find any mention to it in the upgrade guide.

This is quite likely a bug - and an edge case we had concerns about. We've got one report so far here: https://github.com/intuit/karate/issues/1515#issuecomment-799145191
So it would be tremendously helpful if you can provide a way to replicate, following this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
One recommendation is do not return JS functions in the results of callSingle() try to stick to "pure" data or JSON.

Related

Example of launching browser window via Playwright with Karate [duplicate]

This question already has an answer here:
How to get playwrightUrl of Docker container for Playwright (needed to integrate Karate scripts)?
(1 answer)
Closed 1 year ago.
Does anyone have a simple example of launching a browser window in a Karate .feature file using Playwright?
Preferable where the Playwright server is already started. I'm especially not clear on what parameters need to be included in the * configure driver = line.
Instructions are here: https://github.com/karatelabs/karate/tree/master/karate-core#playwright
If already started, you do need to know what the server URL is. Then the driver config would be something like this:
* configure driver = { type: 'playwright', start: false, playwrightUrl: '<change me>' }
It seems that newer versions of Playwright do allow you to set the server URL value to a "known" value when you start the server, see wsPath here: https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server
Playwright support in Karate is still a bit experimental, so if you can report your findings here, that will help others.

Can the Swift compiler create a single executable for my application?

I'm currently trying to create an executable for my Vapor application, but I just can't run it on my server.
My expectation was that it would be able to create a single application with all my code and the dependencies. My current references are .NET and Go, where you can create a single executable from the code and deploy this standalone file - which makes it amazingly simple to deploy.
I tried compiling and executing it on Docker, but no such luck - it failed with some libSwift something missing.
So, can Swift do something like this?
Looking forward to your answers
You can build a binary that statically links the standard library or build a completely self contained binary using the static linking flags introduced in Swift 5.3.1 - -static-stdlib and -static-executable. See this forum post for more details.
Note that swift still has some dependencies on ICU and libc so aren't completely portable yet

KARATE, VScode : "Run Karate Test" codelens not displayed [duplicate]

This question already has an answer here:
Unable to use read('classpath:') when running tests with standalone karate.jar
(1 answer)
Closed 1 year ago.
Visual Studio Code 1.43.0
Karate Standalone JAR 0.9.5.RC5
In the VScode editor, in a Karate .feature file opened, the codelens "Run Karate Test", as shown in the screenshot, isn't displayed anymore.
So, it is impossible to debug a specific scenario.
Any idea about this?
Thanks a lot.
In a correct configuration, it looks like this :
We are still unable to reproduce this issue. Referencing some searches it appears this may be due to a broader issue such as other plugins Eg. Intellisense. Reference to the broader issues https://www.google.com/search?q=vscode+codelens+not+showing
I would recommend trying a clean install with only the Karate Plugin to do some process of elimination. The latest Karate Version is 0.8.1 by the way which it doesn't appear you are using. The Codelens names have changed recently to "Karate: Run" and "Karate: Debug".
Hope this helps.

Swagger UI with SailsJS v0.12.13

I'm having the following errors when rendering swagger-ui :
I've copied the contents of the dist folder from swagger-ui under assets/docs but can't get it to work.
Thanks
Currently there's an open issue for this error. The UI project is being stabilized (getting to v3) and might be broken now.
If you don't need the very latest version, perhaps you're better off using an earlier and stable release of Swagger-UI.
Update: The issue is now closed and the problem should be resolved.

how to compile spatialite for iOS

I am new here and this is my first topic. I am very new on iOS platform and i am trying to use spatialiate extension with sqlite3 but i couldn't do this. It is making me crazy. I don't know how and where do i start. Can someone give me suggestion?
Thanks.
I'm the guy who shared the libs on http:// ;-)
I did some good progress on easing the integration of spatialite for iOS.
Now I'm able to build a fully standalone static library of spatialite (2.3.1 that embeds the required GEOS and PROJ so that don't have to take car of them).
Just download the zip http://lionel.gueganton.free.fr/spatialite/spatialite2.3.1.zip and you'll get the .a for x86 and arm + headers so that you can use directly the spatialite interface from those headers.
Once you've drag n drop the .a (both are required to work in the simulator AND on the real hardware), you can initialize spatialite by just invoking spatialite_init(1).
The following should be displayed on your console log:
SpatiaLite version ..: 2.3.1 Supported Extensions:
- 'VirtualShape' [direct Shapefile access]
- 'VirtualText [direct CSV/TXT access]
- 'VirtualNetwork [Dijkstra shortest path]
- 'RTree' [Spatial Index - R*Tree]
- 'MbrCache' [Spatial Index - MBR cache]
- 'VirtualFDO' [FDO-OGR interoperability]
- 'SpatiaLite' [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.6.1, 21 August 2008
GEOS version ........: 3.1.1-CAPI-1.6.0
Roll up, Roll up, get them while they're hot!
Masters, the Google-fu is strong in this one!
Can't say I wrote this (I do plan on having CMake scripts for both iPhone SQLite and Spatialite, sometime real soon), but I suggest you get yourselves over to this site, before 404:
http://lionel.gueganton.free.fr/spatialite/
go download you some goodies, including pre-compiled Spatialite + extensions 2.3.1 binaries!!!.
There is an SQLite-on-OSX Cmake script (originally found here), which, with probably little work, should be re-targetable at SQLite-iPhone builds (I'll do it, just as soon as I get the time). This should allow you to use the latest SQLite version (I've read that the Apple-included version is slightly crippled). Then, supposedly, you just have to reference the new header files in a local manner, i.e. using quotes
(e.g. "sqllitexxx.h")
instead of using angle brackets:
(<sqllitexoldx.h>)
So, do I get those juicy points ;-) ?
Cheers
Big Rich
Spatialite for iOS in 3 easy steps:
Get the Makefile and patch from https://github.com/gstf/libspatialite-ios
Type make
There is no step 3
Hat tip to Gustaf Lindqvist for making this available!
You may have to compile to armv7 target (optimised build), you should also link with stdlib++.dylib.