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

AWSCognitoNetworkPreferences cannot be found after upgrading to 2.x #3004

Closed
grutts opened this issue Jun 2, 2023 · 13 comments
Closed

AWSCognitoNetworkPreferences cannot be found after upgrading to 2.x #3004

grutts opened this issue Jun 2, 2023 · 13 comments
Assignees
Labels
auth Issues related to the Auth category bug Something isn't working

Comments

@grutts
Copy link

grutts commented Jun 2, 2023

Describe the bug

We are upgrading our library from 1.x to 2.11.5

Our existing code will not build, as AWSCognitoNetworkPreferences can no longer be found.

We've read the upgrade instructions and amplify codebase but can't find references to the network preferences or an alternative configuration.

import Amplify
import AWSCognitoAuthPlugin

try Amplify.add(plugin: AWSCognitoAuthPlugin(networkPreferences: AWSCognitoNetworkPreferences(
        // Limit number of retries and timeout to prevent spamming of backend after iPad reconnects to internet
        maxRetryCount: 2,
        timeoutIntervalForRequest: 60,
        timeoutIntervalForResource: 60
)))
try Amplify.configure()

Steps To Reproduce

Run the above code

Expected behavior

It continues to work

Amplify Framework Version

2.11.5

Amplify Categories

Auth

Dependency manager

Swift PM

Swift version

5

CLI version

n/a

Xcode version

14.2

Relevant log output

No response

Is this a regression?

No

Regression additional context

No response

Device

iPad 10 simulator

iOS Version

15

Specific to simulators

No response

Additional context

No response

@atierian atierian added auth Issues related to the Auth category feature-request Request a new feature labels Jun 2, 2023
@grutts
Copy link
Author

grutts commented Jun 2, 2023

Hi please could you explain why this is tagged as a feature request and not a bug? This code worked in version 1.X

@atierian
Copy link
Member

atierian commented Jun 2, 2023

Generally, adding a new API into a major version would be considered new feature. But you're right, it looks like v2 has removed the ability to configure these values, and with that has removed support for this use case.

@atierian atierian added bug Something isn't working and removed feature-request Request a new feature labels Jun 2, 2023
@aws-amplify aws-amplify deleted a comment from github-actions bot Jun 2, 2023
@grutts
Copy link
Author

grutts commented Jun 12, 2023

OK thank you for correcting the label. Do you have an estimate of when this will be prioritised? This bug blocks us from upgrading the library - so it would be good if it was fixed with ample buffer before V1 of the library left maintenance (May 31, 2024)

@harsh62
Copy link
Member

harsh62 commented Jun 12, 2023

@grutts Our team is reviewing the effort and changes that would needed to support this feature in Amplify V2. We will post an update on the issue in the next couple of weeks.

@grutts
Copy link
Author

grutts commented Jul 10, 2023

Hi @harsh62 do you have an update please?

@grutts
Copy link
Author

grutts commented Oct 13, 2023

Hello, do you have an estimate when this will be fixed now that awslabs/aws-sdk-swift#1065 has been merged?

@atierian
Copy link
Member

Hey @grutts

We're planning on releasing a version of Amplify Swift early next week (likely Monday 10/16) that uses the updated version of AWS SDK for Swift. That won't contain the API allowing you to configure network preferences.

Once that's released, we'll work on getting another version released containing an API that allows you to set the network preferences. I can't commit to any timelines, but I expect it to happen quickly at this point.

We'll follow up with any updates. Thanks for your patience.

@atierian atierian self-assigned this Oct 13, 2023
@atierian atierian added the work in progress Issues was triaged and investigation done label Oct 13, 2023
@grutts
Copy link
Author

grutts commented Oct 13, 2023

Thanks @atierian - that's a very helpful update

@grutts
Copy link
Author

grutts commented Nov 15, 2023

Hi @atierian do you have an update on the status of this?

@harsh62
Copy link
Member

harsh62 commented Nov 15, 2023

@grutts Thanks for your patience. The underlying changes that would be needed to support this feature has been released. Our team is currently prioritizing the design for this feature to be implemented. We will provide an update. I'll post an update on the issue.

@harsh62 harsh62 self-assigned this Nov 17, 2023
@atierian atierian removed their assignment Nov 21, 2023
@harsh62
Copy link
Member

harsh62 commented Nov 24, 2023

@grutts Quick Update:
I was able to create a draft PR for the feature. I would need a little more time to get this merged and write tests around it. I am aiming to release this sometime later next week.

Meanwhile, if you get time, would you be able to test this in a feature branch auth-network-preferences and validate if it works as intended for you.

@grutts
Copy link
Author

grutts commented Nov 24, 2023

Hi @harsh62 thanks for the update. We should be able to test this w/c 4 December

@ruisebas ruisebas added the pending-community-response Issue is pending response from the issue requestor label Dec 7, 2023
@5d
Copy link
Member

5d commented Dec 7, 2023

The fix PR has been released in version 2.24.0. Feel open to reopen this ticket if you still having the issue.

@5d 5d closed this as completed Dec 7, 2023
@5d 5d removed pending-community-response Issue is pending response from the issue requestor work in progress Issues was triaged and investigation done labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth category bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants