Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAzureBlobStorageFile.configure() - index 3 beyond bounds [0 .. 2] #46

Open
dittmarconsulting opened this issue Jun 1, 2022 · 1 comment

Comments

@dittmarconsulting
Copy link

Hi all,

I just tried out this library but after installing and running it on iOS (not tested yet on Android) I ran into this native error:

testapp[46556:2915999] [native] Exception '*** -[__NSArrayM objectAtIndexedSubscript:]:index 3 beyond bounds [0 .. 2]' 
was thrown while invoking configure on target EAzureBlobStorageFile with params (
    myblobaccount,
    "UFMhZU6VKfRDbg...AtqMWUVkoUDzQ==",
    somecontainer
    0
)

I'm running a bare RN app with these packages

"react": "^17.0.2",
"react-native": "^0.67.0",
"react-native-azure-blob-storage": "^2.0.3",

It seems it can't pass the configure params

EAzureBlobStorageFile.configure(
  'myblobaccount',
  'UFMhZU6VKfRDbg...AtqMWUVkoUDzQ==', 
  'somecontainer',
  false
)
@dittmarconsulting
Copy link
Author

dittmarconsulting commented Jun 1, 2022

I found the issue in your function

RCT_EXPORT_METHOD(configure:(NSString *)account_name 
  key:(NSString *)account_key 
  container:(NSString *)conatiner_name 
  token:(bool *)sas_token)
  {
   ...
  }

According to the allowed argument-types bool should be BOOL like

token:(BOOL *)sas_token)

Can you please correct that and push a new version so I don't have to patch it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant