I still getting the same error on every device I have while using SQLite:
"System.DllNotFoundException: /system/lib/libsqlite.so occurred"
It always happens on this line:
var r = SQLite3.Open (databasePathAsBytes, out handle, (int) openFlags, IntPtr.Zero);
What can I do?
EDIT: Is this function correct used???:
public bool CreateDatabase()
{
try
{
using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "CryptoSimulator.db")))
{
connection.CreateTable<Portfolio>();
connection.CreateTable<Wallet>();
connection.CreateTable<Assignments>();
return true;
}
}
catch(SQLiteException ex)
{
Log.Info("SQLiteEx", ex.Message);
return false;
}
}
i did have a same problem try to downgrade your Xamarin if you are on Windows but mac seems to be stable
Related
if(Application.internetReachability != NetworkReachability.NotReachable)
{
isConnected = true;
Debug.Log("Success Connect");
}
else
{
isConnected = false;
Debug.Log("Failed Connect");
}
After updating Unity to the latest version, Application.internetReachability always returns NotReachable on Android phones.
There were no problems when using 2019.1.x, but problems arose from 2019.2.1 to the latest version.
Is there anything I need to do in the new version?
Please reply. Thank you.
I'm using Xamarin.iOS for an application using AVAudioEngine.
Sometimes I get this exception :
AVFoundation_AVAudioPlayerNode_Play
Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine->IsRunning()'
This point to my code:
private Dictionary<AudioTrack, AVAudioPlayerNode> _dicPlayerNodes;
private void PlayAudio()
{
try
{
NSError err;
if (Engine.StartAndReturnError(out err))
{
foreach (var audioTrack in _dicPlayerNodes)
{
AVAudioPlayerNode node = audioTrack.Value;
node.Play();
}
}
else
{
Messenger.Publish(new AudioErrorMessage(this) { Platform = "IOS", Code = Convert.ToInt32(err.Code), Message = err.LocalizedDescription ?? err.Description });
_exceptionHandlerService.PostHockeyApp(new Exception($"{err.Code} {err.Description}"));
}
}
catch (Exception ex)
{
_exceptionHandlerService.PostExceptionAsync(ex).Forget();
}
}
I don't understand how is it possible to have this exception that engine is not running, because in my code I Start it and get error if it failed to start ... Then play it.
Also I have a try catch that's not working in this case :( so my applicaton just crashed.
Any advices or idea ?
I comes to this thread but it doesn't help me to understand:
https://forums.developer.apple.com/thread/27980
versions:
IOS version : 10.3.3
Device: ipad 2
Xamarin.ios: 11.2.0.11
Thanks
I have added the Facebook.dll and the Facebook.Client.dll, this code works fine on the Windows Phone and Windows 8.1 app however its not working on the Windows 10 application coded in XAML and C#. Is anyone having this issue also?
public async Task<string> LogIntoFacebook()
{
//var session = new Session();
Session FacebookSessionClient = new Session(Constants.FacebookAppId);
try
{
FacebookSessionClient.LoginWithBehavior(_FacebookPermissions, FacebookLoginBehavior.LoginBehaviorAppwithMobileInternetFallback);
await Session.CheckAndExtendTokenIfNeeded();
}
catch (FacebookOAuthException exception)
{
SimpleIoc.Default.GetInstance<IErrorService>().ReportErrorInternalOnly(exception);
return null;
}
catch (InvalidOperationException ex)
{
SimpleIoc.Default.GetInstance<IErrorService>().ReportErrorInternalOnly(ex);
return null;
}
catch (Exception ex)
{
SimpleIoc.Default.GetInstance<IErrorService>().ReportErrorInternalOnly(ex);
return null;
}
return null;
}
This part "await Session.CheckAndExtendTokenIfNeeded();" should be where the login happens but nothing happens.
Here is a link: http://blogs.windows.com/buildingapps/2015/07/14/windows-sdk-for-facebook/
You can find a new Windows SDK for Facebook, it has login it
PS: you can alos look here: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-how-to-register-facebook-authentication/
I am using the Map functionality of Windows Phone 8.1 to find a route with the following code:
MapRouteFinderResult routeResult = null;
try
{
if (true == typeOfTransport.Equals(GlobalDeclarations.TypeOfTransport.Walk))
{
routeResult = await MapRouteFinder.GetWalkingRouteAsync(startPoint, endPoint);
}
else
{
routeResult = await MapRouteFinder.GetDrivingRouteAsync(startPoint, endPoint, MapRouteOptimization.Time, MapRouteRestrictions.None, 290);
}
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
}
The problem is that despite the try-catch, this MapRouteFinder.GetWalkingRouteAsync method crashes with an exception: Object not set to an instance of an object. Both startPoint and endPoint params are obviously not null, and filled with data. Why is this? And why the whole app crashes instead of catching the exception in the try-catch section?
using IPC over local TCP to communicate from Client to a Server thread. The connection itself doesn't seem to be throwing any errors, but every time I try to make one of the associated calls, I get this message:
System.Runtime.Remoting.RemotingException: Could not connect to an IPC Port: The System cannot Find the file specified
What I am attempting to figure out is WHY. Because this WAS working correctly, until I transitioned the projects in question (yes, both) from .NET 3.5 to .NET 4.0.
Listen Code
private void ThreadListen()
{
_listenerThread = new Thread(Listen) {Name = "Listener Thread", Priority = ThreadPriority.AboveNormal};
_listenerThread.Start();
}
private void Listen()
{
_listener = new Listener(this);
LifetimeServices.LeaseTime = TimeSpan.FromDays(365);
IDictionary props = new Hashtable();
props["port"] = 63726;
props["name"] = "AGENT";
TcpChannel channel = new TcpChannel(props, null, null);
ChannelServices.RegisterChannel(channel, false);
RemotingServices.Marshal(_listener, "Agent");
Logger.WriteLog(new LogMessage(MethodBase.GetCurrentMethod().Name, "Now Listening for commands..."));
LogEvent("Now Listening for commands...");
}
Selected Client Code
private void InitializeAgent()
{
try
{
_agentController =
(IAgent)RemotingServices.Connect(typeof(IAgent), IPC_URL);
//Note: IPC_URL was originally "ipc://AGENT/AGENT"
// It has been changed to read "tcp://localhost:63726/Agent"
SetAgentPid();
}
catch (Exception ex)
{
HandleError("Unable to initialize the connected agent.", 3850244, ex);
}
}
//This is the method that throws the error
public override void LoadTimer()
{
// first check to see if we have already set the agent process id and set it if not
if (_agentPid < 0)
{
SetAgentPid();
}
try
{
TryStart();
var tries = 0;
while (tries < RUNCHECK_TRYCOUNT)
{
try
{
_agentController.ReloadSettings();//<---Error occurs here
return;
} catch (RemotingException)
{
Thread.Sleep(2000);
tries++;
if (tries == RUNCHECK_TRYCOUNT)
throw;
}
}
}
catch (Exception ex)
{
HandleError("Unable to reload the timer for the connected agent.", 3850243, ex);
}
}
If you need to see something I haven't shown, please ask, I'm pretty much flying blind here.
Edit: I think the issue is the IPC_URL String. It is currently set to "ipc://AGENT/AGENT". The thing is, I have no idea where that came from, why it worked before, or what might be stopping it from working now.
Update
I was able to get the IPC Calls working correctly by changing the IPC_URL String, but I still lack understanding of why what I did worked. Or rather, why the original code stopped working and I needed to change it in the first place.
The string I am using now is "tcp://localhost:63726/Agent"
Can anyone tell me, not why the new string works, I know that...but Why did the original string work before and why did updating the project target to .NET 4.0 break it?