smsimone / fastlane_launcher

A vscode plugin that parse fastlane's Fastfile to make it easier to run lanes
Apache License 2.0
2 stars 2 forks source link

Error: Got error while parsing Fastfile #4

Closed mfdeveloper closed 4 months ago

mfdeveloper commented 6 months ago

Hi there!

After install this extension and reload my vscode, the error below is always showing:

ezgif-7-fecacf9a81

Only this notification is displayed. I tried to see a detailed message error on vscode Output tab, but there isn't a pane for this extension there 😞

I just did a simple fastlane init command, that generates the Fastfile below:

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do
 desc "Runs all the tests"
 lane :test do
   gradle(task: "test")
 end

 desc "Submit a new Beta Build to Firebase App Distribution"
 lane :beta do
   gradle(task: "clean assembleRelease")
   firebase_app_distribution

   # sh "your_script.sh"
   # You can also use other beta testing services here
 end

 desc "Deploy a new version to Google Play"
 lane :deploy do
   gradle(task: "clean assembleRelease")
   upload_to_play_store
 end
end
smsimone commented 6 months ago

Hi! Are you on windows?

mfdeveloper commented 6 months ago

Hi! Are you on windows?

@smsimone Yes, I am 😅

I'm using fastlane to automate builds for some Android apps and an Unity game as well. The game is cross-platform, and the PC version is mainly for Windows

smsimone commented 5 months ago

@mfdeveloper it was a problem given by how windows handles the paths

the version 0.1.2 which addresses this issue is now in verify, it will be soon available on the marketplace, thank you!

mfdeveloper commented 5 months ago

Hi @smsimone, thank you so much for your attention on this issue.

I tested right now, but unfortunately the error still persists đŸ˜ĸ The downloaded version from marketplace is: v0.2.0. Is that actual fixed version?

fastlane-launcher-version-resize

Could you add an Output panel to this extension? Maybe that can help sharing my complete stacktrace error with you :) What do you think?

smsimone commented 5 months ago

Hi @mfdeveloper, I'm adding the output on the output panel right now, I hope to deliver it by tonight

smsimone commented 5 months ago

@mfdeveloper the new update should've been deployed on the store, can you check again?

mfdeveloper commented 5 months ago

@smsimone Sorry for my late response. I saw your message only right now.

Follow my stacktrace error below:

ℹī¸: Found a single fastfile at path: file:///d%3A/projects/fastlane-project-test/fastlane/Fastfile
ℹī¸: Made some magic on the path to make it windows like. New path: d:\projects\fastlane-project-test\fastlane\Fastfile
⛔ī¸: Got error while creating tree view: Error: No lanes found
⛔ī¸: Error: No lanes found
    at Object.parseFastfile (%HOME%\.vscode\extensions\smsimone.fastlane-launcher-0.2.1\out\parser.js:19:15)
    at populateView (%HOME%\.vscode\extensions\smsimone.fastlane-launcher-0.2.1\out\extension.js:191:27)
    at %HOME%\.vscode\extensions\smsimone.fastlane-launcher-0.2.1\out\extension.js:177:17
    at Generator.next (<anonymous>)
    at fulfilled (%HOME%\.vscode\extensions\smsimone.fastlane-launcher-0.2.1\out\extension.js:5:58)

Analyzing this error message, maybe you should replace the Windows backslash \ by a simple slash /, right ?

By the way, what do you think to label the Output panel with the display name, like the others extensions?

image

smsimone commented 5 months ago

Analyzing this error message, maybe you should replace the Windows backslash \ by a simple slash /, right ?

Nope, on windows the right path is given by the backslashes, quite awful but that's it

Regarding the error Error: No lanes found, it's because right now the extensions looks for lines that starts with the regex ^(private_)?lane, so the lane have to be put at the start of the line to be found. In your case, you're wrapping them in a platform section, which is indenting them inside by one tab

As a temporary workaround you could take them outside the platform section or align them on the left side

By the way, what do you think to label the Output panel with the display name, like the others extensions?

Yep, will do

mfdeveloper commented 5 months ago

Hi @smsimone !

I tried the both workarounds that you suggested, but I'm still seeing the error: ⛔ī¸: Error: No lanes found đŸ˜ĸ Could you please try do that in your machine, with the Fastfile below?


# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

desc "Runs all the tests"
lane :test do
  gradle(task: "test")
end

desc "Submit a new Beta Build to Firebase App Distribution"
lane :beta do
  gradle(task: "clean assembleRelease")
  firebase_app_distribution

  # sh "your_script.sh"
  # You can also use other beta testing services here
end

desc "Deploy a new version to Google Play"
lane :deploy do
  gradle(task: "clean assembleRelease")
  upload_to_play_store
end
smsimone commented 4 months ago

Hi @mfdeveloper! I've been busy with work and I managed to fix it now, as you update to version 0.2.2 it should be working

mfdeveloper commented 4 months ago

Hi @smsimone !

No problem! I understand you completely...I know what you mean with "busy with work" 😅 Thanks a lot for your attention to solve that issue.

Yaaaay, now it works, even though using platform section !!! đŸĨŗ🎉

image


Additionally, I would like to suggest some extra changes:

Maybe we can create one or more issues to implement each one of that suggestions. What do you think?

smsimone commented 4 months ago

If you could create an issue for each one would be nice! Anyway, regarding the second point, it's already implemented: you can write the command which will be called as you click on the lane in the settings

image