0

Not able to connect to back4App.

I am following the steps from back4App I am able to get the App running in emulator. However, I don't see anything in Back4App dashboard.

Login at Back4App. Find your app and click on Dashboard. Click on Core. Go to Browser.

I don't see installation under Core -> Database-browser.

I verified many times the applictionID and .NET key.
Tried to put try/catch around SaveAync code, but I don't see any exception. Stuck here.

using Android.App;
using Android.Widget;
using Android.OS;
using Android.Support.V7.App;
using Android.Support.V7.AppCompat;

using Parse;

namespace App1
{
    [Activity(Label = "App1", MainLauncher = true)]
    public class MainActivity : AppCompatActivity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);


            ParseClient.Initialize(new ParseClient.Configuration
            {
                ApplicationId = GetString(Resource.String.back4app_app_id),
                WindowsKey = GetString(Resource.String.back4app_dotnet_key),
                Server = "https://parseapi.back4app.com"
            });


            SetContentView(Resource.Layout.Main);


            ParseInstallation.CurrentInstallation.SaveAsync();
        }
    }
}

I expect installation folder to be created in Back4App.

bish
  • 1
  • 3
  • Can you please change it to `await ParseInstallation.CurrentInstallation.SaveAsync();` add a try/catch around it and check if there is any exception? – Davi Macêdo Sep 09 '19 at 01:30
  • I have already tried that. – bish Sep 09 '19 at 15:36
  • Can you try to get a Verbose application out log, and share it as a Pastebin or something, so we can see what the logs are telling you – Saamer Sep 09 '19 at 16:20
  • 1
    I wasn't waiting long enough to capture exception. Here it is. e = {System.NullReferenceException: Object reference not set to an instance of an object. at Parse.Internal.HttpClient+<>c__DisplayClass15.b__d (System.Threading.Tasks.Task`1[TResult] t) [0x00093] in <5d1c0c2b96a7483d85e5c63b3e156125>:0 at Sy.. – bish Sep 09 '19 at 16:21
  • It also seems from the exception, that the library uses "Parse.Internal" from a library (by parseplatform.org) bought and then sunset by Facebook. It also seems that the Back4App Github repo is old, https://github.com/back4app/xamarin-quickstart-example/ – Saamer Sep 09 '19 at 16:29
  • 1
    Hi Bish, I kindly ask you to check the link below, it's a sample project that might help you with that: https://github.com/templates-back4app/xamarin-helloworld/blob/35c60b94c1a8c6f40cfb7ed18aa6315a79c14b28/HelloWorldParseServer/HelloWorldParseServer.Android/MainActivity.cs – Charles Sep 09 '19 at 16:43
  • Getting the same issue with the attached sample. – bish Sep 10 '19 at 16:04
  • Can you point out which line is throwing the null reference exception? – Davi Macêdo Sep 10 '19 at 18:14
  • `await ParseInstallation.CurrentInstallation.SaveAsync()` is giving error. `e = {System.NullReferenceException: Object reference not set to an instance of an object. at Parse.Internal.HttpClient+<>c__DisplayClass15.b__d (System.Threading.Tasks.Task 1[TResult] t) [0x00093] in <5d1c0c2b96a7483d85e5c63b3e156125>:0` – bish Sep 11 '19 at 14:23
  • It worked on a real phone. On emulator it crashes. I would guess the emulator has connectivity issues with internet. – bish Sep 16 '19 at 20:53

1 Answers1

0

It worked on a real phone. On emulator it crashes. I would guess the emulator has connectivity issues with internet.

bish
  • 1
  • 3