mmertama / FigmaQML

Converts Figma designs to QML/QtQuick
MIT License
206 stars 39 forks source link

error QNetworkReply::ProtocolInvalidOperationError #16

Open DarthLowen opened 7 months ago

DarthLowen commented 7 months ago

Hi, first of all, excellent project.

I ran the application (also compiled it from source to be sure) and got the output below. Any idea what I'm doing wrong? I think I have the correct user and project token. It keeps showing me the spinning wheel with an interrupt button (that doesn't do anything) and then goes into some infinite loop saying write componets! write elements

My figma project is a very simple project with some rectangles with gradient color and some colored text.

Thanks!

qrc:/QtCheckBox.qml:15:17: QML Rectangle: The current style does not support customization of this control (property: "background" item: QQuickRectangle(0x12b9e93dfb0, parent=0x0, geometry=0,0 0x0)). Please customize a non-native style (such as Basic, Fusion, Material, etc). For more information, see: https://doc.qt.io/qt-6/qtquickcontrols2-customize.html#customization-reference
qml: Save 1 1
qml: Frestore 1 1
write componets!
write elements
doRequestRendering "1:3" "RENDERING"  error QNetworkReply::ProtocolInvalidOperationError
qml: too many requests
qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/MessageDialog.qml:120:25: QML Rectangle: The current style does not support customization of this control (property: "background" item: QQuickRectangle(0x12ba1e4c9d0, parent=0x0, geometry=0,0 0x0)). Please customize a non-native style (such as BaTimeout "1:4_timeout", etc). For more information,
Timeout "1:3_timeout"io/qt-6/qtquickcontrols2-customize.html#customization-reference
write componets!
write elements
doRetrieveImage "RENDERING" "1:3" false QUrl("")
qml: Rendering 1:3 Url not valid ""
qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/MessageDialog.qml:120:25: QML Rectangle: The current style does not support customization of this control (property: "background" item: QQuickRectangle(0x12ba1e4e6b0, parent=0x0, geometry=0,0 0x0)). Please customize a non-native style (such as Basic, Fusion, Material, etc). For more information, see: https://doc.qt.io/qt-6/qtquickcontrols2-customize.html#customization-reference
doRetrieveImage "RENDERING" "1:4" false QUrl("")
qml: Rendering 1:4 Url not valid ""
write componets!
write elements
write componets!
write elements
<ad infinitum>
mmertama commented 7 months ago

Have you just retried later? Figma server have strange issues time to time, maybe just busy, and then just try again later helps. Especially any rendering request is a bit problematic as then Figma.com does the graphics rendering (to PNG) for you, that is relatively hard operation vs. just post JSON - therefore it has tendency to fail. See FigmaQML settings and avoid ticking any options that says rendering. I have to think alternatives for rendering, as that is intially implemented for testing

DarthLowen commented 6 months ago

Hi, I've been trying on various different times now but unfortunately still the same. Also, if I click the settings button, all options are switched off, including all rendering options. Anything I can do from my end to help debug this? Enable some debug traces or anything?

mmertama commented 6 months ago

If you build in QtCreator and run - Debug mode uses quit lot of asserts, so if we are lucky it crash and tell where is the problem, but I doubt with this case - there is some debug console messages, but no specific logging. What is your OS? I have not tried with Windows lately.

mmertama commented 6 months ago

WASM version's networking get broken when I compiled it on 6.6.2 - Qt is investigating. Im waiting 6.7 - but prepared to fall back to 6.4

teatralaik commented 3 months ago

WASM version's networking get broken when I compiled it on 6.6.2 - Qt is investigating. Im waiting 6.7 - but prepared to fall back to 6.4

Hi, Is there a way to solve this problem? simple 1 rect design is ok, but more complex design also freeze with "RENDERING" QNetworkReply::ProtocolInvalidOperationError error. use Windows and Visual Studio

mmertama commented 3 months ago

Hi, that issue applies only an WASM version. Can you use the native built?

regards, Markus

On Tue 18. Jun 2024 at 16.29, teatralaik @.***> wrote:

WASM version's networking get broken when I compiled it on 6.6.2 - Qt is investigating. Im waiting 6.7 - but prepared to fall back to 6.4

Hi, Is there a way to solve this problem? simple 1 rect design is ok, but more complex design also freeze with "RENDERING" QNetworkReply::ProtocolInvalidOperationError error.

— Reply to this email directly, view it on GitHub https://github.com/mmertama/FigmaQML/issues/16#issuecomment-2176106900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3ZQDOYFKHJ5P7N6WWURBLZIAY3PAVCNFSM6AAAAABJQBQNHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGEYDMOJQGA . You are receiving this because you commented.Message ID: @.***>

teatralaik commented 3 months ago

Excuse me, but i don't understand what is "native" build. I download qt, and install it, then i clone source, build it by cmake and run in visual studio 22. All of this in Windows, not inside VM

mmertama commented 1 month ago

By native I mean non-WASM, within windows build there shall not be a such issue.

taimoortanweer1 commented 3 weeks ago

I have this exact same problem. I am using Qt 6.7. Using 3.1 version of this build... Windows11

qml: Save 1 1 qml: Frestore 1 1 write componets! write elements doRequestRendering "8:61" "RENDERING" error QNetworkReply::ProtocolInvalidOperationError qml: too many requests Timeout "8:61_timeout" Timeout "8:53_timeout" Timeout "8:59_timeout" Timeout "8:57_timeout" write componets! write elements doRetrieveImage "RENDERING" "8:61" false QUrl("") qml: Rendering 8:61 Url not valid "" doRetrieveImage "RENDERING" "8:59" false QUrl("") qml: Rendering 8:59 Url not valid "" doRetrieveImage "RENDERING" "8:53" false QUrl("") qml: Rendering 8:53 Url not valid "" doRetrieveImage "RENDERING" "8:57" false QUrl("") qml: Rendering 8:57 Url not valid "" write componets! write elements write componets! write elements write componets! write elements . . . .Infinity

amireza007 commented 3 weeks ago

I have this exact same problem. I am using Qt 6.7. Using 3.1 version of this build... Windows11

qml: Save 1 1 qml: Frestore 1 1 write componets! write elements doRequestRendering "8:61" "RENDERING" error QNetworkReply::ProtocolInvalidOperationError qml: too many requests Timeout "8:61_timeout" Timeout "8:53_timeout" Timeout "8:59_timeout" Timeout "8:57_timeout" write componets! write elements doRetrieveImage "RENDERING" "8:61" false QUrl("") qml: Rendering 8:61 Url not valid "" doRetrieveImage "RENDERING" "8:59" false QUrl("") qml: Rendering 8:59 Url not valid "" doRetrieveImage "RENDERING" "8:53" false QUrl("") qml: Rendering 8:53 Url not valid "" doRetrieveImage "RENDERING" "8:57" false QUrl("") qml: Rendering 8:57 Url not valid "" write componets! write elements write componets! write elements write componets! write elements . . . .Infinity

I have this exact same problem. I am using Qt 6.7. Using 3.1 version of this build... Windows11

qml: Save 1 1 qml: Frestore 1 1 write componets! write elements doRequestRendering "8:61" "RENDERING" error QNetworkReply::ProtocolInvalidOperationError qml: too many requests Timeout "8:61_timeout" Timeout "8:53_timeout" Timeout "8:59_timeout" Timeout "8:57_timeout" write componets! write elements doRetrieveImage "RENDERING" "8:61" false QUrl("") qml: Rendering 8:61 Url not valid "" doRetrieveImage "RENDERING" "8:59" false QUrl("") qml: Rendering 8:59 Url not valid "" doRetrieveImage "RENDERING" "8:53" false QUrl("") qml: Rendering 8:53 Url not valid "" doRetrieveImage "RENDERING" "8:57" false QUrl("") qml: Rendering 8:57 Url not valid "" write componets! write elements write componets! write elements write componets! write elements . . . .Infinity

It seems there are problems with Two methods in the figmaget.cpp, namely: doRequestRendering and doRetrieveImage.

The resolution for now would be to remove the images from the Figma design file and uncheck the Render view in the settings of the compiled app.

mmertama commented 2 weeks ago

Generating images is pretty heavy operation and likely Figma server throttles image rendering operations.

amireza007 commented 2 weeks ago

Generating images is pretty heavy operation and likely Figma server throttles image rendering operations.

hmm... That's good to know. So, there isn't any problem with doRetrieveImage and it's on Figma's side?