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

Flutter as module added file: media_kit: ERROR: No pubspec.lock was found: ENV["PWD"] = #2073

Closed
1 task
nikunjramiweave opened this issue Dec 24, 2024 · 14 comments

Comments

@nikunjramiweave
Copy link

nikunjramiweave commented Dec 24, 2024

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS

What version are you using?

stream_chat_flutter: 8.1.0

What happened?

[!] Failed to load 'media_kit_video' podspec:
[!] Invalid media_kit_video.podspec file: media_kit: ERROR: No pubspec.lock was found: ENV["PWD"] = "/Users/BIT/Desktop/Projects/BIT/mobile-ios".

issue on media-kit : media-kit/media-kit#421
As per media-kit , the build script looks for the Flutter project's structure. Futter as module yet not in scope

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nikunjramiweave nikunjramiweave added the bug Something isn't working label Dec 24, 2024
@nikunjramiweave nikunjramiweave changed the title file: media_kit: ERROR: No pubspec.lock was found: ENV["PWD"] = Flutter as module added file: media_kit: ERROR: No pubspec.lock was found: ENV["PWD"] = Dec 24, 2024
@xsahil03x
Copy link
Member

xsahil03x commented Jan 6, 2025

Hey @nikunjramiweave , there isn't a way for media_kit to know about your pubspec.lock file path when you use it in add to app configuration so you can set it yourself via the PWD_FALLBACK env variable.

eg: while running the pod install command, append the env variable.

PWD_FALLBACK=$HOME/StudioProjects/path_to_flutter_module pod install 

media-kit/media-kit#421 (comment)

@nikunjramiweave
Copy link
Author

nikunjramiweave commented Jan 7, 2025 via email

@xsahil03x
Copy link
Member

Hey @nikunjramiweave , It works for me in the sample app that was linked in the original issue on media_kit. Can you share a small sample app where i can try to replicate this issue for you? Thanks

@nikunjramiweave
Copy link
Author

nikunjramiweave commented Jan 8, 2025 via email

@nikunjramiweave
Copy link
Author

nikunjramiweave commented Jan 8, 2025 via email

@deven98
Copy link
Contributor

deven98 commented Jan 8, 2025

Hey @nikunjramiweave 👋

Mediakit was only used post 8.0.0+ in the Stream SDK. The error you mentioned for inline implementation has been solved in the 8.0+ version. The ENV error you are getting is due to the application not recognizing where the pubspec.lock file is located in the project. As such, this should be solved by correctly setting the ENV fallback as mentioned by @xsahil03x.

The project used by him is located here and you can try the same over there as well.

Let us know how it goes.

Thanks.

@nikunjramiweave
Copy link
Author

Hey @deven98
I tried to but not work even in the sample code of media kit
Image-7

@xsahil03x
Copy link
Member

xsahil03x commented Jan 8, 2025

Hey @nikunjramiweave, I don't think setting env variables like this will work for you, it didn't worked for me either. What worked for me was when i set it in the zshrc file or when i set it before running the pod install command like this below.

PWD_FALLBACK=$HOME/StudioProjects/path_to_flutter_module pod install
Screen.Recording.2025-01-08.at.15.04.15.mov

@nikunjramiweave
Copy link
Author

nikunjramiweave commented Jan 8, 2025 via email

@xsahil03x
Copy link
Member

xsahil03x commented Jan 8, 2025

@nikunjramiweave , can you try printing the env before running the command to check if it's properly set? Also make sure to save the file and open a new terminal instance.

Screenshot 2025-01-08 at 15 44 28

btw this is my zshrc file

Screenshot 2025-01-08 at 15 45 34

If this still doesn't work, can you share a sample project where we can reproduce it? Thanks

@nikunjramiweave
Copy link
Author

@xsahil03x
Still not working. Attach sample project zip file
flutter_module_use_media_kit-main.zip

@xsahil03x
Copy link
Member

xsahil03x commented Jan 9, 2025

@nikunjramiweave , it was the same project that i was testing on. It might be something with your configurations.

Screen.Recording.2025-01-09.at.12.06.34.mov

@xsahil03x xsahil03x removed the bug Something isn't working label Jan 9, 2025
@deven98
Copy link
Contributor

deven98 commented Jan 10, 2025

Hi @nikunjramiweave,

Since this is an issue with configuration and not the SDK, I am closing this issue. Sahil (@xsahil03x) has also posted substantial material on how to get this working. If you run into anything with the SDK itself, you can of course file a new issue here or with support and we can take a look.

Thanks.

@deven98 deven98 closed this as completed Jan 10, 2025
@nikunjramiweave
Copy link
Author

@xsahil03x @deven98 Thanks pod install working fine but I am still unable to run the iOS project of my & sample project.

Image

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

No branches or pull requests

3 participants