Closed kayalardanmehmet closed 5 years ago
hey @kayalardanmehmet , thanks for the report, if you use the one you built locally, does creating the tracker work?
hello @BenFradet, thanks for your quick reply. I am not sure that I understood correctly (I am not good at C# and Unity, I am just trying to implement snowplow tracker for an existing project) but, when I run(play) the application on the Unity it works. It sends events to collector successfully. But when I build it for Android or iOS it doesn't work. I also tried it on an iPhone. Here, you can see the logs from device:
2019-03-07 14:50:03.496490+0300 hexart[678:152689] [logging-persist] cannot open file at line 42263 of [95fbac39ba]
2019-03-07 14:50:03.496520+0300 hexart[678:152689] [logging-persist] os_unix.c:42263: (0) open(//snowplow_events.db) - Undefined error: 0
2019-03-07 14:50:03.498493+0300 hexart[678:152689] [logging] API call with unopened database connection pointer
2019-03-07 14:50:03.498521+0300 hexart[678:152689] [logging] misuse at line 127904 of [95fbac39ba]
When you said:
When I remove them from the Plugins it can be build
Did it apply to both unity and mobile or just mobile?
I found the problem. We need to use full path of application on Android and iOS to create or open db file. By default, DATABASE_NAME in tracker is defined as "URI=file:snowplow_events.db"
. When I change it to "URI=file:"+Application.persistentDataPath+"/snowplow_events.db"
it starts working on Android and iOS too. I can see that you added a parameter to set custom DATABASE_NAME but I made a change for the default value and will make a pull request about it.
When I try to create new tracker I get this error on Android devices:
Also, when I import your plugin it also copies System.Data.dll and System.Web.dll. This time Visual Compiler returns this error:
When I remove them from the Plugins it can be build. Could this be the problem ?