Titanium Android App Crashes on Device - titanium

I am making an app that uses google api for providing routes between two locations . My app is crashing regularly on android simulator and device as well.
The code and error log is as :
code
var map=require('ti.map');
var window = Ti.UI.createWindow({title:'win'});
Ti.Geolocation.getCurrentPosition(function(e){
// ********FOR DEVICE*********
// var clat=e.coords.latitude;
// var clon=e.coords.longitude;
var Map=map.createView({
region:{
/****For Simulator*****/
latitude:28.5015171,
longitude:77.0857142,
/*****For Device******/
// latitude:clat,
// longitude:clon
},
title:Map,
mapType : map.STANDARD_TYPE,
animate : true,
zoom:-10,
regionFit : true,
userLocation : true
});
var Ann=[map.createAnnotation({
/****For Simulator*****/
latitude:28.5015171,
longitude:77.0857142,
/*****For Device*****/
// latitude:clat,
// longitude:clon
title:"I m Here",
subtitle:'My Current Location',
pincolor:map.ANNOTATION_RED,
}),
map.createAnnotation({
latitude:28.5686,
longitude:77.1122,
title:"Destination",
subtitle:"I wish to be there",
pincolor:map.Annotation_GREEN,
})];
Map.addAnnotations(Ann);
// Method to check Location On Device
// if (e.error) {
// alert('HFL cannot get your current location');
// return;
// } else {
/*********For Device***/
// longitude = clon;
// latitude = clat;
/****For Simulator*****/
latitude=28.5015171,
longitude=77.0857142,
// Assign the destination Latitude and Longitude.
destinationLongitude = 77.1122;destinationLatitude=28.5686;
// The bellow URL is used to Get the route of current location to assigned destination Location.
var url = "http://maps.googleapis.com/maps/api/directions/json?origin=" + latitude+','+longitude + "&destination=" + destinationLatitude +','+ destinationLongitude +"&sensor=true";
// The Bellow URL use the static current location to destination Location.
// var url = "http://maps.googleapis.com/maps/api/directions/json? origin=37.422502,-122.0855498&destination=37.389569,-122.050212&sensor=true";
var xhr = Titanium.Network.createHTTPClient();
xhr.open('GET', url);
Ti.API.info('URL: ' + url);
xhr.onload = function() {
Ti.API.info('inside the xhr-->' + this.responseText);
var xml = this.responseText;
var points = [];
// Bellow Variable have the step of the current location to destination Location. Using the Steps we going to create a route.
var position = JSON.parse(this.responseText).routes[0].legs[0].steps;
if (position[0] != null) {
points.push({
latitude : position[0].start_location.lat,
longitude : position[0].start_location.lng,
});
// Here we use the for loop to collect all the steps and push it to the array and use this array to form the route in android.
for (var i = 0; i < position.length; i++){
points.push({
latitude : position[i].end_location.lat,
longitude : position[i].end_location.lng,
});
}
}
var route=map.addRoute({
points:points,
width:4,
color:'blue'
});
Map.add(route);
};
// };
window.open();
window.add(Map);
});
Error log
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.and.AndroidmapActivity#417def20
[WARN] : InputMethodManager: startInputInner : InputBindResult == null
[WARN] : dalvikvm: VFY: unable to resolve static field 3896 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3881 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3877 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3892 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3889 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3885 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3883 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3889 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3878 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3875 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3890 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3880 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3879 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3876 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3891 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3888 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3884 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3882 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3887 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 3886 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[INFO] : I/Google Maps Android API: Google Play services client version: 4132500
[INFO] : dalvikvm: Could not find method gui.a, referenced from method gqh.a
[WARN] : dalvikvm: VFY: unable to resolve static method 24934: Lgui;.a (Landroid/content/Context;)Lgrh;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[INFO] : I/Google Maps Android API: Google Play services package version: 5089034
[WARN] : dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[WARN] : dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[INFO] : dalvikvm: Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
[WARN] : dalvikvm: Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
[ERROR] : dalvikvm: Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a
[WARN] : dalvikvm: VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lgls;
[WARN] : dalvikvm: VFY: unable to resolve static field 3896 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40dd8258)
[ERROR] : TiApplication: (main) [2486,2486] Sending event: exception on thread: main msg:java.lang.ClassCastException: ti.map.AnnotationProxy cannot be cast to java.lang.Object[]; Titanium 3.3.0,2014/07/11 12:36,787cd39
[ERROR] : TiApplication: java.lang.ClassCastException: ti.map.AnnotationProxy cannot be cast to java.lang.Object[]
[ERROR] : TiApplication: at ti.map.TiUIMapView.processMapProperties(TiUIMapView.java:156)
[ERROR] : TiApplication: at ti.map.TiUIMapView.onViewCreated(TiUIMapView.java:111)
[ERROR] : TiApplication: at org.appcelerator.titanium.view.TiUIFragment.handleMessage(TiUIFragment.java:65)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:4624)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[WARN] : TiVerify: (Timer-0) [2385,4871] Verifying module licenses...
[INFO] : Process: Sending signal. PID: 31701 SIG: 9
Any help will be apreciated.

Related

How does one get the dbt power user extension in vscode to actually work? I have one and clicked to update it but got an error

I got two errors. The first is :
Error while updating 'dbt Power User' extension. Please check the [log](command:workbench.action.showWindowLog) for more details.
The second error is:
[2022-09-27 09:21:53.593] [renderer4] [error] [Extension Host] (node:16272) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `Code --trace-warnings ...` to show where the warning was created)
[2022-09-27 09:21:55.813] [renderer4] [error] XHR failed: Download: XHR failed
at G.downloadExtension (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:170479)
at async G.doRun (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169610)
[2022-09-27 09:22:05.897] [renderer4] [error] ["Download: XHR failed"," at G.downloadExtension (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:170479)"," at async G.doRun (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169610)"]
[2022-09-27 09:22:05.916] [renderer4] [error] XHR failed: Download: XHR failed
at G.downloadExtension (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:170479)
at async G.doRun (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169610)
[2022-09-27 09:30:55.976] [renderer4] [error] ["Download: XHR failed"," at G.downloadExtension (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:170479)"," at async G.doRun (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169610)"]
[2022-09-27 09:30:56.023] [renderer4] [error] XHR failed: Download: XHR failed
at G.downloadExtension (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:170479)
at async G.doRun (vscode-file://vscode-app/c:/Users/josh/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169610)

Can't able to run react-native-maps in my Project

I am trying to install react-native-maps in my project and followed the instructions given in the https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md. But still I am getting error after running my project in Android and it displays error of UIBlock which is present in the AirMapModule.java of react-native-maps in Android Studio. Can anyone help me regarding this?
Here are the versions of my project:
"react": "16.6.1",
"react-native": "^0.59.2",
"react-native-maps": "^0.23.0"
Here is the error which I am getting :
^
symbol: class UIBlock
location: package com.facebook.react.uimanager
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:129: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package
if (!contextHasBug(appContext.getCurrentActivity())) {
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:130: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package
superContext = appContext.getCurrentActivity();
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:133: error: cannot find symbol
if (!contextHasBug(reactContext.getCurrentActivity())) {
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapView.java:134: error: cannot find symbol
superContext = reactContext.getCurrentActivity();
^
symbol: method getCurrentActivity()
location: variable reactContext of type ThemedReactContext
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\ViewAttacherGroup.java:23: error: cannot find symbol
this.setOverflow("hidden"); // Change to ViewProps.HIDDEN until RN 0.57 is base
^
symbol: method setOverflow(String)
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapMarkerManager.java:127: error: method does not override or implement a method from a supertype
#Override
^
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapMarkerManager.java:130: error: cannot find symbol
super.setZIndex(view, zIndex);
^
symbol: method setZIndex(AirMapMarker,float)
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:90: error: cannot find symbol
uiManager.addUIBlock(new UIBlock() {
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:149: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:192: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:229: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\AirMapModule.java:262: error: cannot find symbol
uiManager.addUIBlock(new UIBlock()
^
symbol: class UIBlock
location: class AirMapModule
D:\Maps\Project\node_modules\react-native-maps\lib\android\src\main\java\com\airbnb\android\react\maps\RegionChangeEvent.java:15: error: no suitable constructor found for Event(int)
super(id);
^
constructor Event.Event() is not applicable
(actual and formal argument lists differ in length)
constructor Event.Event(int,long) is not applicable
(actual and formal argument lists differ in length)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
14 errors```
Try to split your Maven dependancies as explained here:
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url "https://maven.google.com"
}
}
}
https://github.com/react-native-community/react-native-maps/issues/2090

Titanium appcelerator module not found

I'm facing an error when building my titanium appcelerator application for android, below are modules installed :
- modules
Android > com.pushwoosh.module and dk.napp.drawer
tiapp.xml
<modules>
<module platform="iphone">dk.napp.drawer</module>
<module platform="android">dk.napp.drawer</module>
...
When i build the app, and run it from device i get following error :
[ERROR] : TiExceptionHandler: (main) [60613,103255] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [1,103256] - In ti:/module.js:303,2
[ERROR] : TiExceptionHandler: (main) [0,103256] - Message: Uncaught Error: Requested module not found: dk.napp.drawer
[ERROR] : TiExceptionHandler: (main) [0,103256] - Source: throw new Error("Requested module not found: " + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?
[ERROR] : V8Exception: Exception occurred at ti:/module.js:303: Uncaught Error: Requested module not found: dk.napp.drawer
[ERROR] : ViewRootImpl: sendUserActionEvent() mView == null
So i don't know why the app doesn't found the dk.app.drawer module, here is a screenshot of all modules:
Thanks again for your helps
In the screenshot you only show the version 1.2.4 which is the iOS version. Did you add the android version too?
https://github.com/viezel/NappDrawer/tree/master/android/dist

Unable to figure out dependencies for spray.io's spray-servlet module

Relevant parts of my build.sbt are here:
libraryDependencies ++= Seq (
"org.scalatest" % "scalatest_2.10" % "1.9.1" % "test",
//Spray dependencies
"io.spray" % "spray-servlet" % "1.1-M7",
"com.typesafe.akka" %% "akka-actor" % "2.2-M3",
"com.typesafe.akka" %% "akka-slf4j" % "2.2-M3",
//Servlet API?
//"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" artifacts Artifact("javax.servlet", "jar", "jar"),
"javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided",
"ch.qos.logback" % "logback-classic" % "1.0.12"
)
resolvers ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
"spray repo" at "http://repo.spray.io",
"typesafe repo" at "http://repo.typesafe.com/typesafe/releases/",
"releases" at "http://oss.sonatype.org/content/repositories/releases")
I get these same 12 errors no matter what I try to use for the servlet API (or maybe it's not the Servlet API at all?):
[info] Loading global plugins from /home/dkowis/.sbt/plugins
[info] Loading project definition from /home/dkowis/gitwork/turbo-jug-robot/project
[info] Set current project to turbo-jug-robot (in build file:/home/dkowis/gitwork/turbo-jug-robot/)
[info] Updating {file:/home/dkowis/gitwork/turbo-jug-robot/}default-5e44c0...
[info] Resolving javax.servlet#javax.servlet-api;3.0.1 ...
[info] Done updating.
[info] Compiling 2 Scala sources to /home/dkowis/gitwork/turbo-jug-robot/target/scala-2.10/classes...
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:15: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:48: overloaded method value apply with alternatives:
[error] (optionalBody: Option[spray.http.HttpBody])spray.http.HttpEntity <and>
[error] (buffer: Array[Byte])spray.http.HttpEntity <and>
[error] (string: String)spray.http.HttpEntity
[error] cannot be applied to (spray.http.MediaType, String)
[error] entity = HttpEntity(`text/html`,
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:18: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/ping"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:21: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/stream"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:25: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/crash"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:30: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/timeout"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:33: not found: value Uri
[error] case HttpRequest(GET, Uri.Path("/timeout/timeout"), _, _, _) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:38: not found: value Timedout
[error] case Timedout(HttpRequest(_, Uri.Path("/timeout/timeout"), _, _, _)) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:41: not found: value Timedout
[error] case Timedout(request: HttpRequest) =>
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:42: not found: value request
[error] sender ! HttpResponse(500, "The " + request.method + " request to '" + request.uri + "' has timed out...")
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:72: value withAck is not a member of spray.http.ChunkedResponseStart
[error] client ! ChunkedResponseStart(HttpResponse(entity = " " * 2048)).withAck(Ok(count))
[error] ^
[error] /home/dkowis/gitwork/turbo-jug-robot/src/main/scala/spray/examples/DemoService.scala:85: value withAck is not a member of spray.http.MessageChunk
[error] client ! MessageChunk(DateTime.now.toIsoDateTimeString + ", ").withAck(Ok(remaining - 1))
[error] ^
[error] 12 errors found
[error] (compile:compile) Compilation failed
[error] Total time: 4 s, completed May 25, 2013 1:32:40 PM
I'm truly at a loss as to what the proper dependencies are, and they're not exactly spelled out on the spray.io site. Or I'm dumb and can't figure out what the dependencies are.
Aha, turns out that the git master branch has newer, breaking changes in it, and so the examples aren't valid for any released artifacts. Using a tag in the repo, in my case 1.1-M7 made everything happy again.
Herp derp.

Mono p/invoke giving 'undefined symbol __dso_handle'

I added the .so to LDConfig following this article. Still getting the following. You can get the source for the code here. Here is the log from the startup of the binary.
MONO_LOG_LEVEL=debug mono 39dll-4-linux.exe
Mono: gc took 20 usecs
Mono: Assembly Loader probing location: '/usr/lib/mono/4.0/mscorlib.dll'.
Mono: Image addref mscorlib[0x1bd58e0] -> /usr/lib/mono/4.0/mscorlib.dll[0x1bd4c10]: 2
Mono: AOT failed to load AOT module /usr/lib/mono/4.0/mscorlib.dll.so: /usr/lib/mono/4.0/mscorlib.dll.so: cannot open shared object file: No such file or directory
Mono: Assembly Loader loaded assembly from location: '/usr/lib/mono/4.0/mscorlib.dll'.
Mono: Config attempting to parse: '/usr/lib/mono/4.0/mscorlib.dll.config'.
Mono: Config attempting to parse: '/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: Assembly mscorlib[0x1bd58e0] added to domain 39dll-4-linux.exe, ref_count=1
Mono: Config attempting to parse: '/etc/mono/config'.
Mono: Config attempting to parse: '/home/nick/.mono/config'.
Mono: Assembly Loader probing location: '39dll-4-linux.exe'.
Mono: Image addref 39dll-4-linux[0x1c520f0] -> /home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe[0x1bd3980]: 3
Mono: Assembly 39dll-4-linux[0x1c520f0] added to domain 39dll-4-linux.exe, ref_count=1
Mono: AOT failed to load AOT module /home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe.so: /home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe.so: cannot open shared object file: No such file or directory
Mono: Assembly Loader loaded assembly from location: '39dll-4-linux.exe'.
Mono: Config attempting to parse: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe.config'.
Mono: Config attempting to parse: '/etc/mono/assemblies/39dll-4-linux/39dll-4-linux.config'.
Mono: Assembly Loader probing location: '39dll-4-linux.exe'.
Mono: AOT failed to load AOT module /home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe.so: /home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/39dll-4-linux.exe.so: cannot open shared object file: No such file or directory
Mono: Assembly Ref addref 39dll-4-linux[0x1c520f0] -> mscorlib[0x1bd58e0]: 2
Mono: DllImport attempting to load: 'libWinsockLib'.
Mono: DllImport loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib'.
Mono: DllImport error loading library '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so'.
Mono: DllImport error loading library '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so: undefined symbol: __dso_handle'.
Mono: DllImport loading location: 'libWinsockLib'.
Mono: DllImport error loading library: 'libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport loading location: 'libWinsockLib.so'.
Mono: DllImport error loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so: undefined symbol: __dso_handle'.
Mono: DllImport loading: 'libWinsockLib'.
Mono: DllImport error loading library 'libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport unable to load library 'libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport attempting to load: 'libWinsockLib'.
Mono: DllImport loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib'.
Mono: DllImport error loading library '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so'.
Mono: DllImport error loading library '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so: undefined symbol: __dso_handle'.
Mono: DllImport loading location: 'libWinsockLib'.
Mono: DllImport error loading library: 'libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport loading location: 'libWinsockLib.so'.
Mono: DllImport error loading library: '/home/nick/Projects/39dll-4-linux/39dll-4-linux/bin/Debug/libWinsockLib.so: undefined symbol: __dso_handle'.
Mono: DllImport loading: 'libWinsockLib'.
Mono: DllImport error loading library 'libWinsockLib: cannot open shared object file: No such file or directory'.
Mono: DllImport unable to load library 'libWinsockLib: cannot open shared object file: No such file or directory'.
Unhandled Exception: System.DllNotFoundException: libWinsockLib
at (wrapper managed-to-native) dll4linux.Net:dllInit ()
at dll4linux.SockLib.Init () [0x00000] in <filename unknown>:0
at dll4linux.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libWinsockLib
at (wrapper managed-to-native) dll4linux.Net:dllInit ()
at dll4linux.SockLib.Init () [0x00000] in <filename unknown>:0
at dll4linux.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
I am completely stumped. Any ideas as to whats going wrong?
FYI, I am invoking the following C# code:
[DllImport("libWinsockLib", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dllInit")]
public static extern Double dllInit();
Finally, I used the following build commands to build the 39dll-4-linux project:
Executed for each .cpp file:
g++ -fPIC -c -o obj/<filename>.o <filename>.cpp
Then I executed:
ld -G obj/*.o -o 39dll4linux.so
Never mind! I figured it out. Turns out, ld is not a good way to package and link a shared library.
Instead of the ld command, i used:
g++ -shared obj/*.o -o 39dll-4-linux.so
It works like a charm!