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

cuppertino_http: allow normal dart test (without Flutter) #806

Open
xvrh opened this issue Oct 5, 2022 · 3 comments
Open

cuppertino_http: allow normal dart test (without Flutter) #806

xvrh opened this issue Oct 5, 2022 · 3 comments
Assignees
Labels
package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug

Comments

@xvrh
Copy link

xvrh commented Oct 5, 2022

I would like to use cupertino_http on my mac directly with dart test (out of a Flutter context).

Currently running `dart test integration_test/api_test.dart' fails with this error:

 Invalid argument(s): Failed to load dynamic library 'cupertino_http.framework/cupertino_http': dlopen(cupertino_http.framework/cupertino_http, 0x0001): tried: '/Users/xavier/flutter/bin/cache/dart-sdk/bin/./cupertino_http.framework/cupertino_http' (no such file), '/Users/xavier/flutter/bin/cache/dart-sdk/bin/../../../cupertino_http.framework/cupertino_http' (no such file), '/Users/xavier/flutter/bin/cache/dart-sdk/bin/Frameworks/cupertino_http.framework/cupertino_http' (no such file), '/Users/xavier/flutter/bin/cache/dart-sdk/bin/./cupertino_http.framework/cupertino_http' (no such file), '/Users/xavier/flutter/bin/cache/dart-sdk/bin/../../../cupertino_http.framework/cupertino_http' (no such file), '/Users/xavier/flutter/bin/cache/dart-sdk/bin/Frameworks/cupertino_http.framework/cupertino_http' (no such file), 'cupertino_http.framework/cupertino_http' (no such file), '/System/Library/Frameworks/cupertino_http.framework/cupertino_http' (no such file)
  dart:ffi                                             new DynamicLibrary.open
  package:cupertino_http/src/utils.dart 32:27          _loadHelperDynamicLibrary
  package:cupertino_http/src/utils.dart 40:15          _loadHelperLibrary
  package:cupertino_http/src/utils.dart 28:43          helperLibs
  package:cupertino_http/src/utils.dart                helperLibs
  package:cupertino_http/cupertino_http.dart 850:59    URLSession._delegate
  package:cupertino_http/cupertino_http.dart           URLSession._delegate
  package:cupertino_http/cupertino_http.dart 945:43    new URLSession.sessionWithConfiguration
  package:cupertino_http/cupertino_client.dart 201:32  new CupertinoClient.fromSessionConfiguration
  package:cupertino_http/cupertino_client.dart 195:28  new CupertinoClient.defaultSessionConfiguration
  integration_test/utils_api.dart 34:28                ApiContext._createMacClient
  integration_test/utils_api.dart 27:41                new ApiContext
  integration_test/api_test.dart 20:18       main.<fn>

My use case is to be able to run http tests with a server requiring a VPN.

Thanks

@xvrh xvrh added package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug labels Oct 5, 2022
@brianquinlan
Copy link
Collaborator

Hi @xvrh , I'd like that too :-(

Unfortunately, there is no convenient way to inject a native build step in dart-without-flutter and cupertino_http includes some Objective-C code.

@soeren-schmaljohann-2denker

Any updates on this?

@brianquinlan
Copy link
Collaborator

Any updates on this?

No. Until Dart supports Native assets there isn't a good solution for this problem.

What is your use case? We have http.testing for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants