question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto completion a request has failed error

See original GitHub issue

Describe the bug I have two files the first one is user_response.dart and contains UserResponse class and the second one is token_response.dart and contains TokenResponse class When I type a part of TokenResponse class name then select the full name from the auto completion list in Visual Studio Code this error message appear:

A request has failed. See the output for more information
Source: Dart (Extension)

The output:

[Error - 12:06:55 PM] Request completionItem/resolve failed.
  Message: No such element: TokenResponse in package:my_app/responses/user_response.dart
  Code: -32602 
TokenResponse

To Reproduce Steps to reproduce the behavior: I don’t how to reproduce the problem

Expected behavior It should auto complete the class name and insert the import for it.

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • VS Code version: 1.60.0
  • Dart extension version: 3.26.0
  • Dart/Flutter SDK version: Flutter 2.2.3 • channel stable

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SuporteSysrs01commented, Jun 17, 2022

I’m having the same issue after removing a part of from a Dart file. Every time I trigger auto complete for the class it tries to get it’s import from the old file it was a part of, instead of the actual path.

Request completionItem/resolve failed.
  Message: No such element: MyClass in package:myapp/old_path_to/the_file_it_was_part_of.dart

Removing (I actually renamed) .dartServer fixed it.

1reaction
scheglovcommented, Oct 13, 2021

Could you please send the ex folder to me scheglov@google.com?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempt to automatically complete failed: The source or target ...
Developer Community. Attempt to automatically complete failed: The source or target repository was not found. Auto-complete has been reset.
Read more >
Code completion | IntelliJ IDEA Documentation - JetBrains
Techniques to accelerate the editing process in IntelliJ IDEA using code completion (basic completion, smart completion based on type, ...
Read more >
List of HTTP status codes - Wikipedia
This is a list of Hypertext Transfer Protocol (HTTP) response status codes. Status codes are issued by a server in response to a...
Read more >
Error codes in Device Manager in Windows - Microsoft Support
In this article, we will help you find your error code and suggest what you ... Code 43 "Windows has stopped this device...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
This code is sent in response to an Upgrade request header from the client and ... The request failed due to failure of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found