Why do react-native project sometimes become unable to build / assemble out of the blue with no changes made? Do they auto upgrade stuff? - react-native

So everybody that works with React Native probably know the frustration. Everything was working fine and all of a sudden the project doesn't built anymore. Most of the times it breaks on gradlew assembleRelease.
How is this even possible? It happened to me over the course of the last few years over and over again. Litterally no changes, and boom, random errors. Most of the times you trace the error to some question on stackoverflow and you apply some random fix, downgrade of libraries e.t.c.
But my question is: why does this even happen in the first place? Does react-native / gradle auto update stuff? Sometimes when I run from Android Studio I notice in the status bar that Gradle seems to download/sync a lot of stuff.
How can you work reliable on software if it breaks out of nowhere? My most recent example is this one. From my github repo I know for sure there has not been a single change.
My most recent example? This one. The person that asked the question is saying the same. Changed nothing, and project breaks.
More than one file was found with OS independent path 'lib/armeabi-v7a/libfbjni.so'
Off course people come up with solutions, such as upgrade your RN to a patch version. But no one seems to answer the most obvious question; why and how does this even break in the first place when no changes are made?
Off course people come up with solutions, such as upgrade your RN to a patch version. But no one seems to answer the most obvious question; why and how does this even break in the first place when no changes are made?

Related

When I use VS Code write Vue.js, the code color sometimes get chaos

as shown below:
I don't understand why, the syntax and format is correct, it's extremely confusing.
I review my code carefully but can't figure out
this seems to be a bug with VS Code. This could be because VS Code is not updated, or an extension that is not supported anymore.
first, try ctrl + shift + p and running >Developer: Reload Window this should reload your current environment and the error should be fixed.
If that doesn't work, try a different extension. I currently use Vetur, and Prettier.
And don't forget to make sure your VS Code is up to date. go to the bottom left and click the settings cog, then check for update or updates.
My answer is, "Start from scratch, and record your steps." I'm happy to share my notes on what is presently working: https://github.com/TheAutomaTom/VsCodeSettings-Vue3
My personal machine had been in that spot for some weeks, so I took a step back and dump out your cornucopia of extensions and their dependencies.
Only run pertinent language services. This is a tall order given how much a Vue + Typescript + Tailwind on Vite app covers. I am suspicious of generalized HTML/CSS/JS packs though, because they may not be built to parse Vue SFCs. Every new release of a services intended for other frameworks, like Angular or React, are still possible culprits (and moving targets).
I gave up getting Prettier and ESLint on stable ground. For a non-workplace thing, I feel okay about that. You may be having issues with a global package, if you've been experimenting. I've tossed out a couple branches following different tutorials. I intend to revisit this one since it has some example projects: rvest.vs-code-prettier-eslint
I've noticed the Volar team seems to let oddities squeak out a little more frequently than I remember in Vetur.... but we love them just the way they are. Sometimes I downgrade just to check if I've gone crazy, yet.

Page not found java project deployed using tomcat [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I've got one java web based project. Build using JDK 1.8 and Using Intellij as IDE.
Using tomcat to deploy the product
Essentially in our product I was trying to test a few things with a class.
Very recently what has happened is whenever I am compiling and putting it inside our project it is saying page not found.
So, I reverted my code base to Out of the box state, compiled and put it back. Still it
s giving me page not found error.
One annoying this about this error is, In the logs I don't have a single error.
So it's not even hinting on where to look or what's going on.
Second annoying this was, like I did some series of changes , but for every change I took a back up. Think of it like, if default OTB was Revision 1, My changes are in Revision 2,3,4. From revision 4 I started to get this error. But when I take revision 1 and put it back. Still getting page not found. But if I take Revision 2 or 3. It is working.
I've compared all revisions and code wise there's no such change, which could break anything. I've a strong doubt that it could be one of the project structure settings.
I checked local history, but apparently local history refreshes every time you rebuild a project so no luck there.
I want to understand and resolve this problem.
Any tips on how to handle this, will help greatly.
Thanks
So, the answer to this problem was Embarrassingly simple.
Our project was last certified with OpenJDK11 but I mixed two of my tasks and started using openJDK12.
I don't understand what exactly in OpenJDK12 broke this.
And I want to inspect what went wrong.
But for the current task at hand. 1 solution is as simple as reverting back to OpenJDK11. After that when I used this modified class it was working perfectly.
PS: Still not 100% sure if it was due to jdk version. But If it was I wonder why in logs it was not mentioning that error. Which says compiled using higher version of Java.

Xcode mixing Branches

This may sound strange, but I am having issues with Xcode mixing branches, or at least messing everything up.
I created a new branch (v1.4), then created a new data model and renamed an entity. Had to switch back to previous branch (v1.3) to check something and I get errors at run time on v1.3, it's looking for the new entity name from Branch v1.4 - what the %$^#% is happening. I searched the files, the new entity name is nowhere in v1.3.
I switch branches again to v1.2 and it ran fine. So, switched to V1.3 again - nogo. Switched back to v1.2 and it has the same issue now, runtime error because it can't find the new entity name.
What is happening? Anyone else have this issue?
Any thoughts/suggestions would be greatly appreciated.
OS X 10.11.6
Xcode 7.1.1
==[EDIT]===
I am not real familiar with GIT, just starting to learn. I ran the couple commands as mentioned, get nothing for either git diff commands.
Running git status --ignored I do get multiple files as untracked - still working on understanding why (Separate issue) - couple object files and 2 data models (Was 3, but manually added one to commit.
Also I get 3 ignored files:
.DS_Store
projectName.xcodeproj/project.xcworkspace/xcuserdata/
projectName/.DS_Store
That's as far as I've gotten. Not familiar enough with git to know if these ignored files are the ones I should delete.
Second option - will restoring from time machine fix this? It may be a little extra work for me to recreate v1.4 but probably less time than I've already spent trying to figure out how to fix it.
I do appreciate both comments so far - thank you.
==[SECOND EDIT]==
Thanks again for your comments.
However, do to time and schedule I perform a Time Machine backup before ElpieKay posted the last comment, so I will not be able to test it.
Reverting back did "fix" it as you'd expect, but I did lose several hours of work but life happens. I will keep this for if/when this happens again and try the git clean -df to see it fixes it.
On a side note - while I was switching back and forth between V1.3 and V1.4 trying to figure this out, 2 of the model versions disappeared on v1.4 - i.e. the name turned red in Xcode and when I viewed the contents of the file they were missing. I do not know if this is related or not, but I thought I would mention it. This happened one other time and I thought maybe I did something - I did a time machine restore to fix it last time. Wonder if git clean -df would have fixed it.

XCode 5 cannot find binaries

Since I started using CocoaPods, I've been having weird location related messages all the time, and some arch-related ones too.
I've been trying the whole day to figure out why it was happening, until I create a new Xcode project from scratch and realize the issue wasn't project-related all along.
Here's what's happening:
I always get those everywhere as well:
Not sure if related but I get those often too:
Anybody has those as well? What should I do?
Thanks!
I had to switch Build Active Architectures Only for debug to Yes and it let the build run.

Xcode 4.4 unable to rename classes/variables

On both Xcode 4.4 and 4.4.1 I'm experiencing the same issue in that with the specific project I'm working on, I don't seem to be able to rename any classes or variables from the Refactor menu option.
Each time I try and do a rename, I type in the new name for the class/variable and click Preview at which point the bottom left begins a spinner with Finding files.... However, I then get a message saying:
The selection is not a type that can be renamed.
Make a different selection and try again.
I'm pretty sure that this is not an issue with my specific install of Xcode, because I can refactor other projects fine, it's just that I can't seem to be able to refactor this specific project.
Anyone with any ideas? I don't have any particularly exotic configuration for this project, it just seems to be a random affliction. I've deleted all of my derived data and re-indexed, but that doesn't seem to help.
Since it works OK in other projects, I'm thinking one thing I could try to do is re-generate the actual project file(s) itself. I don't know if there is a way to do this automatically?
If they're in dropbox get them out of there. It mangles project files. I've had it happen numerous times and at times it makes refactoring > renaming not work.
I have managed to solve this issue after trying many different things (tweaking project settings, pch, etc.) and it turns out there was a very simple (and totally counter-intuitive) method of fixing this issue.
All I have done is:-
Copy my entire project folder (so from Project to Project Copy).
Move Project (the original folder) to trash.
Rename Project Copy to Project.
Mysteriously, everything now works fine.
I really cannot figure out why this works. As mentioned previously, I had already deleted all derived data, etc. so I don't know why this should make things spontaneously work, but it does.
Would appreciate anyone who is able to shed some light on this as it does expose just how fiddly Xcode can be, and any understanding of what goes on under the hood is always beneficial.
Sounds like a buggered index.
I usually use the nuke from space option to delete everything in the derived data directory.
Unless you have changed it (I change mine to /tmp/bbum-derived), it'll be at:
~/Library/Developer/Xcode/DerivedData
Thus, I'll quit Xcode and do:
rm -rf ~/Library/Developer/Xcode/DerivedData
Yes, it is a bit brute force, but it works. You can likely force Xcode to rebuild the index from the UI, but I never bother. Of course, I'm also installing quite a few "odd" builds of this and that as a part of my day job...
(that is an rm -rf. It means "nuke everything and don't ask" in unix parlance. It is dangerous. Do not mistype that command.)
It seems you have an active selection somewhere in the gui, perhaps some of your files or classes are selected ? Try unselect in every sub window and retry refactoring.
I'm a bit late to this thread, but I ran into the same problem today and I was able to get it to finally refactor correctly, thought I share it.
So in large part I did what bbum said, I closed xCode, nuked the Derived data for the project the class files were in and re opened the project. Doing just that, it didn't work; the key, I found (at least for me), is that I had to do a clean (command shift k) after xCode restarts. After that I was able to rename the class files again :)
Also as a side note, my project is divided into the main project, and a static library. When I had to rename classes in the static library, I had to quit the main project and do what I described in the static library itself. Somehow I got the same error described in the question when I tried to do the refactor/rename from the main project.
Good luck!
This thread was very helpful for me in determining the problem.
It turned out that I had to Repair Disk with Disk Utility. I had visited a site earlier that had hijacked Safari and was telling me to call a number for emergency repairs, an obvious scam.
I followed the Disk Utility instructions to repair disk (including restarting with CMD-R pressed). Another clue was that I tried to commit to git and Xcode said No Way, Jose.
Afterwards I was able to refactor and commit changes as if nothing ever happened. I hope this helps someone else as a possible cause to investigate.