Xamarin.Auth AccountStore Exception

Hello.

If I would like to create an AccountStore instance, then I get the following error:

09-30 18:02:17.194 D/Mono ( 1326): Assembly Ref addref System[0x9dc64b80] -> mscorlib[0xb3cf1d00]: 7
Loaded assembly: /storage/emulated/0/Android/data/.../files/.override/System.dll [External]
Exception:

Java.IO.FileNotFoundException: /data/data/.../files/Xamarin.Social.Accounts: open failed: ENOENT (No such file or directory…

        private AccountStore AccountStoreStore;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Load design
            SetContentView(Resource.Layout.auth);

            // Look for saved accounts
            AccountStoreStore = AccountStore.Create(this);
            Account Account = AccountStoreStore.FindAccountsForService(AUTHPROVIDER).FirstOrDefault();
        }

Posts

  • bartdkbartdk USMember
    edited January 2016

    Bump. Having the same issue.
    Any help on this one ?

    Java.IO.FileNotFoundException: /data/data/com.paperapp/files/Xamarin.Social.Accounts: open failed: ENOENT (No such file or directory)

    https://bugzilla.xamarin.com/show_bug.cgi?id=36468

  • YkshLeoYkshLeo USMember ✭✭✭✭

    @BartDeKeersmaeker,

    Can you post your sample code ?

    This error is mainly occurred due to :

    • File Path setting having a folder name same name as the other folder.
    • Too long file path
    • Missing permissions : <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  • bartdkbartdk USMember
    edited February 2016

    @YkshLeo

    public class AccountRepository : IAccountRepository { public AccountStore Store => AccountStore.Create(Application.Context);}

  • I have the same error. The permission is set. The path is set by the auth lib itself not by me.

    AccountStore.Create(Application.Context).FindAccountsForService(ONEDRIVE_SERVICE_ID).ToList();

    AccountStore.Create(Application.Context).Save(eventArgs.Account, ONEDRIVE_SERVICE_ID);

    Both lines will throw the exception.

  • AhirAhir USMember ✭✭

    I am using Goole login without webview ....How to get Account

    account = AccountStore.Create().FindAccountsForService("App4").FirstOrDefault();

  • AhirAhir USMember ✭✭

    I am using Goole login without webview ....How to get Account

    account = AccountStore.Create().FindAccountsForService("App4").FirstOrDefault();

Sign In or Register to comment.